diff options
author | spacewander <spacewanderlzx@gmail.com> | 2015-03-04 11:29:37 +0800 |
---|---|---|
committer | spacewander <spacewanderlzx@gmail.com> | 2015-03-04 11:29:37 +0800 |
commit | 4f85b03a87310a6d439b84391ee2261240241e44 (patch) | |
tree | 41a62b5b061b21ced969ade6581e0450ebbfe02e | |
parent | 012dab51959456a27e81be00f76f6aa04e9e8f4e (diff) | |
download | psutil-4f85b03a87310a6d439b84391ee2261240241e44.tar.gz |
Fix ioprio range error
IO priority levels range from 0 (highest) to 7 (lowest), according to the manpage of `ioprio_set`
-rw-r--r-- | psutil/_pslinux.py | 4 |
1 files 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: |