Commit 1bd4155b authored by Guillaume Seguin's avatar Guillaume Seguin

Hardcode RLIMIT_NICE for psutil < 1.1

parent 4868798a
...@@ -81,7 +81,8 @@ try: ...@@ -81,7 +81,8 @@ try:
if platform.system() != "Windows": if platform.system() != "Windows":
import resource import resource
nice_limit, _ = resource.getrlimit(psutil.RLIMIT_NICE) rlimit_nice = 13 if not hasattr(psutil, "RLIMIT_NICE") else psutil.RLIMIT_NICE
nice_limit, _ = resource.getrlimit(rlimit_nice)
high_priority_nice = 20 - nice_limit high_priority_nice = 20 - nice_limit
def set_nice(nice): def set_nice(nice):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment