diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-02-09 21:07:45 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-02-09 21:07:45 +0100 |
commit | 13cf7d7ab356233c3bb8dc34f1143e7bb0c2c088 (patch) | |
tree | e9a9ea8dd2654f5a19810c2653e0c47bab5bbf75 /psutil/_pslinux.py | |
parent | 72274ac02bd9b3b0c08acf861a2df223538b1c9e (diff) | |
download | psutil-13cf7d7ab356233c3bb8dc34f1143e7bb0c2c088.tar.gz |
fix #1650 [Linux] sensors_temperatures() no longer emit warnings on file not found (print debug msg instead)
Diffstat (limited to 'psutil/_pslinux.py')
-rw-r--r-- | psutil/_pslinux.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 06935111..7348b3dc 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -26,6 +26,7 @@ from . import _psposix from . import _psutil_linux as cext from . import _psutil_posix as cext_posix from ._common import AccessDenied +from ._common import debug from ._common import decode from ._common import get_procfs_path from ._common import isfile_strict @@ -1253,8 +1254,7 @@ def sensors_temperatures(): path = os.path.join(base, 'type') unit_name = cat(path, binary=False) except (IOError, OSError, ValueError) as err: - warnings.warn("ignoring %r for file %r" % (err, path), - RuntimeWarning) + debug("ignoring %r for file %r" % (err, path)) continue trip_paths = glob.glob(base + '/trip_point*') |