Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.

This commit is contained in:
Vinay Sajip 2009-10-16 14:06:44 +00:00
parent 026ac7cf69
commit 03d5c346c0
2 changed files with 15 additions and 14 deletions

View file

@ -287,12 +287,10 @@ class LogRecord:
self.threadName = None
if not logMultiprocessing:
self.processName = None
elif 'multiprocessing' not in sys.modules:
self.processName = 'MainProcess'
else:
try:
from multiprocessing import current_process
self.processName = current_process().name
except ImportError:
self.processName = None
self.processName = sys.modules['multiprocessing'].current_process().name
if logProcesses and hasattr(os, 'getpid'):
self.process = os.getpid()
else: