getpid doesn't exist on MacOS9.
This commit is contained in:
parent
be53242f49
commit
4c641d0ce1
|
@ -213,7 +213,10 @@ class LogRecord:
|
||||||
self.thread = thread.get_ident()
|
self.thread = thread.get_ident()
|
||||||
else:
|
else:
|
||||||
self.thread = None
|
self.thread = None
|
||||||
self.process = os.getpid()
|
if hasattr(os, 'getpid'):
|
||||||
|
self.process = os.getpid()
|
||||||
|
else:
|
||||||
|
self.process = None
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '<LogRecord: %s, %s, %s, %s, "%s">'%(self.name, self.levelno,
|
return '<LogRecord: %s, %s, %s, %s, "%s">'%(self.name, self.levelno,
|
||||||
|
|
Loading…
Reference in New Issue