Chris Jerdonek <[email protected]> added the comment:
Reversing the if-else in Florent's suggestion seems to address points (1) and
(2). Is there a reason to set and check an mp variable rather than simply
having the try-except block?
if not logMultiprocessing:
self.processName = None
else:
# Errors may occur if multiprocessing has not finished loading
# yet - e.g. if a custom import hook causes third-party code
# to run when multiprocessing calls import. See issue 8200
# for an example
try:
self.processName = sys.modules['multiprocessing'].current_process().name
except StandardError:
self.processName = 'MainProcess'
Thanks for the quick action! I'll try in my dev environment when this is
settled.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8200>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com