mirror of https://github.com/nicolargo/glances
Invert get_nice and nice
parent
c8fb2f4891
commit
aa9797c6d9
|
@ -421,12 +421,12 @@ class glancesStats:
|
||||||
procstat['pid'] = proc.pid
|
procstat['pid'] = proc.pid
|
||||||
procstat['username'] = proc.username
|
procstat['username'] = proc.username
|
||||||
|
|
||||||
if hasattr(proc, 'nice'):
|
if hasattr(proc, 'get_nice'):
|
||||||
# Deprecated in PsUtil 0.5.0
|
# Deprecated in PsUtil 0.5.0+
|
||||||
procstat['nice'] = proc.nice
|
|
||||||
elif hasattr(proc, 'get_nice'):
|
|
||||||
# Specific for PsUtil 0.5.0+
|
|
||||||
procstat['nice'] = proc.get_nice()
|
procstat['nice'] = proc.get_nice()
|
||||||
|
elif hasattr(proc, 'nice'):
|
||||||
|
# Else
|
||||||
|
procstat['nice'] = proc.nice()
|
||||||
else:
|
else:
|
||||||
# Never here...
|
# Never here...
|
||||||
procstat['nice'] = 0
|
procstat['nice'] = 0
|
||||||
|
|
Loading…
Reference in New Issue