mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-21 16:22:03 +03:00
Try and catch to solve AccessDenied on nice stat on Windows 7
This commit is contained in:
parent
6a3f774943
commit
73c30932dd
@ -491,7 +491,10 @@ class GlancesGrabProcesses:
|
||||
|
||||
if hasattr(proc, 'get_nice'):
|
||||
# Deprecated in PsUtil 0.5.0+
|
||||
procstat['nice'] = proc.get_nice()
|
||||
try:
|
||||
procstat['nice'] = proc.get_nice()
|
||||
except psutil.AccessDenied, err:
|
||||
pass
|
||||
elif hasattr(proc, 'nice'):
|
||||
# Else
|
||||
procstat['nice'] = proc.nice
|
||||
|
Loading…
Reference in New Issue
Block a user