mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-29 15:32:25 +03:00
Catch exp on alert
This commit is contained in:
parent
7f34a6d07a
commit
e32089f40a
@ -66,7 +66,10 @@ class GlancesActions(object):
|
||||
for cmd in commands:
|
||||
logger.info("Action triggered for {0} ({1}): {2}".format(stat_name, criticity, cmd))
|
||||
splitted_cmd = cmd.split()
|
||||
Popen(splitted_cmd)
|
||||
try:
|
||||
Popen(splitted_cmd)
|
||||
except OSError as e:
|
||||
logger.error("Can't execute the action ({0})".format(e))
|
||||
|
||||
self.set(stat_name, criticity)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user