diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2015-12-14 14:13:56 +0100 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2015-12-14 14:13:56 +0100 |
| commit | 82c4a1c0322c867c336d8cc733b3c3df2e9fc17d (patch) | |
| tree | 43b7cd9bbc0cc1eee27da05c9fdacf581f9c2e2e | |
| parent | 162cd64020b4c6495779c44f5c8fbb0d6d59041e (diff) | |
| download | psutil-82c4a1c0322c867c336d8cc733b3c3df2e9fc17d.tar.gz | |
safety measure for ZombieProcess exc
| -rw-r--r-- | psutil/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/psutil/__init__.py b/psutil/__init__.py index dde807aa..abec6cbb 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -494,6 +494,10 @@ class Process(object): # Process identity / uniqueness over time is guaranteed by # (PID + creation time) and that is verified in __eq__. return self == Process(self.pid) + except ZombieProcess: + # We should never get here as it's already handled in + # Process.__init__; here just for extra safety. + return True except NoSuchProcess: self._gone = True return False |
