getpid doesn't exist on MacOS9.

This commit is contained in:
Jack Jansen 2003-02-21 22:29:45 +00:00
parent be53242f49
commit 4c641d0ce1
1 changed files with 4 additions and 1 deletions

View File

@ -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,