From 4c641d0ce1cc764f300e8c6863eaaf37c956a8d2 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Fri, 21 Feb 2003 22:29:45 +0000 Subject: [PATCH] getpid doesn't exist on MacOS9. --- Lib/logging/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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,