diff options
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 18fe379..12a40b0 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -213,7 +213,10 @@ class LogRecord: self.thread = thread.get_ident() else: self.thread = None - self.process = os.getpid() + if hasattr(os, 'getpid'): + self.process = os.getpid() + else: + self.process = None def __str__(self): return '<LogRecord: %s, %s, %s, %s, "%s">'%(self.name, self.levelno, |