diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 18fe37962af..12a40b029a5 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -213,7 +213,10 @@ def __init__(self, name, level, pathname, lineno, msg, args, exc_info): 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 ''%(self.name, self.levelno,