From fef8ef01f016b2fbc7e89ebbf02b2da964ca466c Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Fri, 3 Feb 2017 13:08:07 +0100 Subject: [PATCH] be more cautious when converting to int() --- psutil/__init__.py | 2 +- psutil/_pslinux.py | 2 +- scripts/internal/download_exes.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/psutil/__init__.py b/psutil/__init__.py index a879e0dc1..511fdacf2 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -192,7 +192,7 @@ ] __all__.extend(_psplatform.__extra__all__) __author__ = "Giampaolo Rodola'" -__version__ = "5.1.1" +__version__ = "5.1.2" 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/_pslinux.py b/psutil/_pslinux.py index 82cdb2d37..1183052b3 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -1114,7 +1114,7 @@ def multi_cat(*paths): for path in paths: ret = cat(path, fallback=null) if ret != null: - return int(ret) + return int(ret) if ret.isdigit() else ret return None root = os.path.join(POWER_SUPPLY_PATH, "BAT0") diff --git a/scripts/internal/download_exes.py b/scripts/internal/download_exes.py index 2a40168c1..d8d2768b2 100755 --- a/scripts/internal/download_exes.py +++ b/scripts/internal/download_exes.py @@ -27,7 +27,7 @@ BASE_URL = 'https://ci.appveyor.com/api' -PY_VERSIONS = ['2.7', '3.3', '3.4', '3.5'] +PY_VERSIONS = ['2.7', '3.3', '3.4', '3.5', '3.6'] def exit(msg):