summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-14 19:53:23 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2009-10-14 19:53:23 (GMT)
commitdd3aa9afee23730771425e95840e3dc7a4bf97e8 (patch)
tree5bdb6533f5ae497674505423b27ffd0683b85a53 /Lib
parent7f7327014c3225e43ddc43cee6b8505c5dd79cfa (diff)
downloadcpython-dd3aa9afee23730771425e95840e3dc7a4bf97e8.zip
cpython-dd3aa9afee23730771425e95840e3dc7a4bf97e8.tar.gz
cpython-dd3aa9afee23730771425e95840e3dc7a4bf97e8.tar.bz2
Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.
Diffstat (limited to 'Lib')
-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 b6941b4..3fe03cd 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -273,12 +273,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: