From: Jack Jansen Date: Fri, 21 Feb 2003 22:29:45 +0000 (+0000) Subject: getpid doesn't exist on MacOS9. X-Git-Tag: v2.3c1~1728 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c641d0ce1cc764f300e8c6863eaaf37c956a8d2;p=thirdparty%2FPython%2Fcpython.git getpid doesn't exist on MacOS9. --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 18fe37962af2..12a40b029a5e 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 ''%(self.name, self.levelno,