diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2023-04-01 12:24:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-01 12:24:59 +0200 |
commit | 7eadee31db2f038763a3a6f978db1ea76bbc4674 (patch) | |
tree | 55d75da147cc3a40b989e18df1126de5167b66cf /psutil/_pslinux.py | |
parent | 7d55ce4e3d81705264398a15ffaa1896f4e1aefc (diff) | |
download | psutil-7eadee31db2f038763a3a6f978db1ea76bbc4674.tar.gz |
Fix pylint warnings / cleanup (#2218)
Diffstat (limited to 'psutil/_pslinux.py')
-rw-r--r-- | psutil/_pslinux.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 1bdeabfe..d178fe16 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -327,8 +327,8 @@ except ImportError: pid, resource_, ctypes.byref(new), ctypes.byref(current)) if ret != 0: - errno = ctypes.get_errno() - raise OSError(errno, os.strerror(errno)) + errno_ = ctypes.get_errno() + raise OSError(errno_, os.strerror(errno_)) return (current.rlim_cur, current.rlim_max) @@ -1837,7 +1837,7 @@ class Process(object): ) except KeyError as err: raise ValueError("%r field was not found in %s; found fields " - "are %r" % (err[0], fname, fields)) + "are %r" % (err.args[0], fname, fields)) @wrap_exceptions def cpu_times(self): |