This fixes it on my machine:
--- data.py 2018-05-22 16:46:51.744204671 +0200
+++ data2.py 2018-05-22 16:48:28.694497438 +0200
@@ -193,8 +193,11 @@
result_dict = {}
try:
for line in open('/proc/%d/status' % pid):
- key, value = line.split(':\t', 1)
- result_dict[key] = value.strip()
+ try:
+ key, value = line.split(':\t', 1)
+ result_dict[key] = value.strip()
+ except:
+ pass
except IOError:
pass # No such process
return result_dict
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1772671
Title:
Kernel produces empty lines in /proc/PID/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1772671/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs