projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be53242
)
getpid doesn't exist on MacOS9.
author
Jack Jansen
<jack.jansen@cwi.nl>
Fri, 21 Feb 2003 22:29:45 +0000
(22:29 +0000)
committer
Jack Jansen
<jack.jansen@cwi.nl>
Fri, 21 Feb 2003 22:29:45 +0000
(22:29 +0000)
Lib/logging/__init__.py
patch
|
blob
|
history
diff --git
a/Lib/logging/__init__.py
b/Lib/logging/__init__.py
index 18fe37962af281774fc870889bf540159224031c..12a40b029a5e7ef1072c69c1f0dfdd92dd386025 100644
(file)
--- 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 '<LogRecord: %s, %s, %s, %s, "%s">'%(self.name, self.levelno,