Fix crash when an import is missing
self.msg is not available when checking the imports. I had the problem on a host where numpy is missing (python 2.7.3).
This commit is contained in:
parent
32b0567343
commit
be4119f84f
|
@ -58,7 +58,7 @@ for mod, msg in [('numpy', 'HyBi protocol will be slower'),
|
||||||
globals()[mod] = __import__(mod)
|
globals()[mod] = __import__(mod)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
globals()[mod] = None
|
globals()[mod] = None
|
||||||
self.msg("WARNING: no '%s' module, %s", mod, msg)
|
print("WARNING: no '%s' module, %s" % (mod, msg))
|
||||||
if multiprocessing and sys.platform == 'win32':
|
if multiprocessing and sys.platform == 'win32':
|
||||||
# make sockets pickle-able/inheritable
|
# make sockets pickle-able/inheritable
|
||||||
import multiprocessing.reduction
|
import multiprocessing.reduction
|
||||||
|
|
Loading…
Reference in New Issue