Replace try by in

This commit is contained in:
nicolargo 2016-12-24 17:00:52 +01:00
parent 67d9b96d86
commit c5c961c1a0

View File

@ -265,9 +265,7 @@ class GlancesProcesses(object):
self.set_max_values(k, procstat[k])
# Process command line (cached with internal cache)
try:
self.cmdline_cache[procstat['pid']]
except KeyError:
if procstat['pid'] not in self.cmdline_cache:
# Patch for issue #391
try:
self.cmdline_cache[procstat['pid']] = proc.cmdline()