From 090ae20078e7135fa0fe95db2b83366079da9802 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Thu, 7 Dec 2017 13:13:36 +0100 Subject: [PATCH] what a stupid bug! (#1190) --- HISTORY.rst | 9 +++++++++ psutil/__init__.py | 2 +- psutil/_psosx.py | 5 ++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index b28e52bb6..eabe7cc6f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,5 +1,14 @@ *Bug tracker at https://github.com/giampaolo/psutil/issues* +5.4.3 +===== + +*XXXX-XX-XX* + +**Bug fixes** + +- 1193_: pids() may return False on OSX. + 5.4.2 ===== diff --git a/psutil/__init__.py b/psutil/__init__.py index 7a170937c..5e29a7fc5 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -219,7 +219,7 @@ ] __all__.extend(_psplatform.__extra__all__) __author__ = "Giampaolo Rodola'" -__version__ = "5.4.2" +__version__ = "5.4.3" version_info = tuple([int(num) for num in __version__.split('.')]) AF_LINK = _psplatform.AF_LINK POWER_TIME_UNLIMITED = _common.POWER_TIME_UNLIMITED diff --git a/psutil/_psosx.py b/psutil/_psosx.py index 4c97af71e..308756a81 100644 --- a/psutil/_psosx.py +++ b/psutil/_psosx.py @@ -309,12 +309,11 @@ def pids(): # https://travis-ci.org/giampaolo/psutil/jobs/309619941 try: Process(0).create_time() + ls.append(0) except NoSuchProcess: - return False + pass except AccessDenied: ls.append(0) - else: - ls.append(0) return ls