From 4f85b03a87310a6d439b84391ee2261240241e44 Mon Sep 17 00:00:00 2001 From: spacewander Date: Wed, 4 Mar 2015 11:29:37 +0800 Subject: Fix ioprio range error IO priority levels range from 0 (highest) to 7 (lowest), according to the manpage of `ioprio_set` --- psutil/_pslinux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 40132794..bc6c7ff4 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -1038,9 +1038,9 @@ class Process(object): value = 0 else: value = 0 - if not 0 <= value <= 8: + if not 0 <= value <= 7: raise ValueError( - "value argument range expected is between 0 and 8") + "value argument range expected is between 0 and 7") return cext.proc_ioprio_set(self.pid, ioclass, value) if HAS_PRLIMIT: -- cgit v1.2.1