mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-19 11:27:45 +08:00
BUG: fix logging for Python < 2.7.
This commit is contained in:
+6
-2
@@ -110,7 +110,7 @@ def get_log(name=None):
|
||||
http://docs.python.org/library/logging.html
|
||||
|
||||
"""
|
||||
import logging, sys
|
||||
import logging
|
||||
|
||||
if name is None:
|
||||
name = 'skimage'
|
||||
@@ -128,7 +128,11 @@ def _setup_log():
|
||||
|
||||
log = logging.getLogger()
|
||||
|
||||
handler = logging.StreamHandler(stream=sys.stdout)
|
||||
try:
|
||||
handler = logging.StreamHandler(stream=sys.stdout)
|
||||
except TypeError:
|
||||
handler = logging.StreamHandler(strm=sys.stdout)
|
||||
|
||||
formatter = logging.Formatter(
|
||||
'%(name)s: %(levelname)s: %(message)s'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user