summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-16 14:06:44 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-16 14:06:44 (GMT)
commit03d5c346c05915816a5e382545b3b9cc547c45fd (patch)
treed2510d96c41b9460aa0892394b3796efadc332e1 /Lib/logging
parent026ac7cf69816f67b3fe9e26dc0b6c97206b8c11 (diff)
downloadcpython-03d5c346c05915816a5e382545b3b9cc547c45fd.zip
cpython-03d5c346c05915816a5e382545b3b9cc547c45fd.tar.gz
cpython-03d5c346c05915816a5e382545b3b9cc547c45fd.tar.bz2
Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 0be6ed4..f85296d 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -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: