This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, flox, vinay.sajip
Date 2010-03-22.18:19:34
SpamBayes Score 2.1985713e-10
Marked as misclassified No
Message-id <1269281977.25.0.784769895838.issue8200@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-03-22 18:19:37chris.jerdoneksetrecipients: + chris.jerdonek, vinay.sajip, flox
2010-03-22 18:19:37chris.jerdoneksetmessageid: <1269281977.25.0.784769895838.issue8200@psf.upfronthosting.co.za>
2010-03-22 18:19:34chris.jerdoneklinkissue8200 messages
2010-03-22 18:19:34chris.jerdonekcreate