mirror of
https://github.com/python/cpython.git
synced 2025-11-28 22:18:54 +00:00
Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.
This commit is contained in:
parent
026ac7cf69
commit
03d5c346c0
2 changed files with 15 additions and 14 deletions
|
|
@ -287,12 +287,10 @@ class LogRecord:
|
||||||
self.threadName = None
|
self.threadName = None
|
||||||
if not logMultiprocessing:
|
if not logMultiprocessing:
|
||||||
self.processName = None
|
self.processName = None
|
||||||
|
elif 'multiprocessing' not in sys.modules:
|
||||||
|
self.processName = 'MainProcess'
|
||||||
else:
|
else:
|
||||||
try:
|
self.processName = sys.modules['multiprocessing'].current_process().name
|
||||||
from multiprocessing import current_process
|
|
||||||
self.processName = current_process().name
|
|
||||||
except ImportError:
|
|
||||||
self.processName = None
|
|
||||||
if logProcesses and hasattr(os, 'getpid'):
|
if logProcesses and hasattr(os, 'getpid'):
|
||||||
self.process = os.getpid()
|
self.process = os.getpid()
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
|
||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #7120: logging: Removed import of multiprocessing which is causing
|
||||||
|
crash in GAE.
|
||||||
|
|
||||||
- Issue #7140: The __dict__ of a module should not be cleared unless the module
|
- Issue #7140: The __dict__ of a module should not be cleared unless the module
|
||||||
is the only object holding a reference to it.
|
is the only object holding a reference to it.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue