commit | 4c641d0ce1cc764f300e8c6863eaaf37c956a8d2 | [log] [tgz] |
---|---|---|
author | Jack Jansen <jack.jansen@cwi.nl> | Fri Feb 21 22:29:45 2003 +0000 |
committer | Jack Jansen <jack.jansen@cwi.nl> | Fri Feb 21 22:29:45 2003 +0000 |
tree | 29e60cd782619c1fd9329da6688f71e4a7a4b45c | |
parent | be53242f49f4f40c372a5300db1d8ad5ac06ffe8 [diff] |
getpid doesn't exist on MacOS9.
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 @@ 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,