diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-11-13 00:27:06 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-11-13 00:27:06 +0100 |
commit | 684c6fb5a425a9667654d0b8a70e790f1b1069e7 (patch) | |
tree | 0db7f1deffbea3d5e58ae125ee7f150a41bbc9a6 /psutil/_psosx.py | |
parent | 3c5438978f621f18b8e9b0b70fde4182221d7cb3 (diff) | |
parent | 4d3f5ba337c5a91efa642699cc96331718889b4f (diff) | |
download | psutil-1173-debug-mode.tar.gz |
Merge branch 'master' into 1173-debug-mode1173-debug-mode
Diffstat (limited to 'psutil/_psosx.py')
-rw-r--r-- | psutil/_psosx.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/psutil/_psosx.py b/psutil/_psosx.py index 8093e814..e9b6ed82 100644 --- a/psutil/_psosx.py +++ b/psutil/_psosx.py @@ -23,6 +23,9 @@ from ._common import parse_environ_block from ._common import sockfam_to_enum from ._common import socktype_to_enum from ._common import usage_percent +from ._exceptions import AccessDenied +from ._exceptions import NoSuchProcess +from ._exceptions import ZombieProcess __extra__all__ = [] @@ -84,12 +87,6 @@ pidtaskinfo_map = dict( volctxsw=7, ) -# these get overwritten on "import psutil" from the __init__.py file -NoSuchProcess = None -ZombieProcess = None -AccessDenied = None -TimeoutExpired = None - # ===================================================================== # --- named tuples @@ -502,10 +499,7 @@ class Process(object): @wrap_exceptions def wait(self, timeout=None): - try: - return _psposix.wait_pid(self.pid, timeout) - except _psposix.TimeoutExpired: - raise TimeoutExpired(timeout, self.pid, self._name) + return _psposix.wait_pid(self.pid, timeout, self._name) @wrap_exceptions def nice_get(self): |