diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2015-11-12 06:09:28 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2015-11-12 06:09:28 +0100 |
commit | d4becc3f156bdc7565a64061f1c5711eb9f6791a (patch) | |
tree | 434f04cbf95c47ecee9c57a8de7c4065bfa8740f /psutil/_psbsd.py | |
parent | 995d5ca8ccfa5983749afe4e232414c66afe0141 (diff) | |
download | psutil-landryb-openbsd.tar.gz |
last fixeslandryb-openbsd
Diffstat (limited to 'psutil/_psbsd.py')
-rw-r--r-- | psutil/_psbsd.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py index 8b980b2d..57d847b9 100644 --- a/psutil/_psbsd.py +++ b/psutil/_psbsd.py @@ -111,7 +111,7 @@ def virtual_memory(): def swap_memory(): """System swap memory as (total, used, free, sin, sout) namedtuple.""" - if sys.platform.startswith("openbsd"): + if OPENBSD: PAGESIZE = 1 total, used, free, sin, sout = [x * PAGESIZE for x in cext.swap_mem()] percent = usage_percent(used, total, _round=1) @@ -305,8 +305,7 @@ def wrap_exceptions(fun): ZombieProcess is None): raise if err.errno == errno.ESRCH: - # if not pid_exists(self.pid): - if self.pid not in pids(): + if not pid_exists(self.pid): raise NoSuchProcess(self.pid, self._name) else: raise ZombieProcess(self.pid, self._name, self._ppid) |