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:
Steven Schmid 2013-10-24 11:42:49 +02:00
parent 32b0567343
commit be4119f84f
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ for mod, msg in [('numpy', 'HyBi protocol will be slower'),
globals()[mod] = __import__(mod)
except ImportError:
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':
# make sockets pickle-able/inheritable
import multiprocessing.reduction