From 4d70bde28349cfa26be350a22003c76c179b207e Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Mon, 15 Sep 2014 17:42:24 +0200 Subject: [PATCH] give CREDIT --- CREDITS | 7 ++++++- HISTORY.rst | 5 ++++- psutil/_pslinux.py | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CREDITS b/CREDITS index 1497d3a87..1420fb55e 100644 --- a/CREDITS +++ b/CREDITS @@ -258,4 +258,9 @@ I: 492 N: Jeff Tang W: https://github.com/mrjefftang -I: 340 \ No newline at end of file +I: 340 + +N: Yaolong Huang +E: airekans@gmail.com +W: http://airekans.github.io/ +I: 530 diff --git a/HISTORY.rst b/HISTORY.rst index 6e1e5ccdc..be4790979 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,7 +18,10 @@ Bug tracker at https://github.com/giampaolo/psutil/issues connections() methods can raise OSError(ESRCH) instead of NoSuchProcess. - #504: [Linux]: can't build RPM packages via setup.py - #506: [Linux]: python 2.4 support was broken. -- #522: [Linux]: Process.cpu_affinity() might return EINVAL. (patch by David Daeschler) +- #522: [Linux]: Process.cpu_affinity() might return EINVAL. (patch by David + Daeschler) +- #530: [Linux]: psutil.disk_io_counters() may crash on old Linux distros + (< 2.6.5) (patch by Yaolong Huang) - #533: [Linux]: Process.memory_maps() may raise TypeError on old Linux distros. diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index f80cf32d4..2abd59c3c 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -642,7 +642,8 @@ def disk_io_counters(): if len(fields) > 7: _, _, name, reads, _, rbytes, rtime, writes, _, wbytes, wtime = \ fields[:11] - else: # from kernel 2.6 to 2.6.25 + else: + # from kernel 2.6.0 to 2.6.25 _, _, name, reads, rbytes, writes, wbytes = fields rtime, wtime = 0, 0 if name in partitions: