diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-11-01 21:15:30 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-11-01 21:15:30 +0100 |
commit | db80c3e2ff263b17332e9c7cf35fdc4fd2af2266 (patch) | |
tree | 2b0b95c7711bcba4f3911ea44b9d9846a18380d4 | |
parent | 9b0efdd06aaac77e4579cab13d894ebed209749f (diff) | |
download | psutil-db80c3e2ff263b17332e9c7cf35fdc4fd2af2266.tar.gz |
revert last commit
-rw-r--r-- | HISTORY.rst | 5 | ||||
-rw-r--r-- | psutil/_pslinux.py | 11 |
2 files changed, 2 insertions, 14 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index fb8ec8f1..54f2d79f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,11 +10,6 @@ XXXX-XX-XX - 1875_: `disk_partitions()` exposes 2 extra fields: `maxfile` and `maxpath`, which are the maximum file name and path name length. -**Bug fixes** - -- 1868_: [Linux] /proc/pid/stat is missing 2 fields on Alpine Linux (cpu_num - and delayacct_blkio_ticks) and are now being set to None. - 5.7.3 ===== diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 63b76697..b17b96a2 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -1577,15 +1577,8 @@ class Process(object): ret['children_utime'] = fields[13] ret['children_stime'] = fields[14] ret['create_time'] = fields[19] - # https://github.com/giampaolo/psutil/issues/1868 - try: - ret['cpu_num'] = fields[36] - except IndexError: - ret['cpu_num'] = None - try: - ret['blkio_ticks'] = fields[39] # aka 'delayacct_blkio_ticks' - except IndexError: - ret['blkio_ticks'] = None + ret['cpu_num'] = fields[36] + ret['blkio_ticks'] = fields[39] # aka 'delayacct_blkio_ticks' return ret |