print execd withen error happens
This commit is contained in:
parent
b528868249
commit
798ee6bcd2
|
@ -26,6 +26,7 @@ def get_next_elapse(timer_name):
|
|||
lines = output.split('\n')
|
||||
for line in lines:
|
||||
if timer_name in line:
|
||||
try:
|
||||
parts = re.search(SYSTEMCTL_TIMERS_RE, line)
|
||||
|
||||
datetime_object = None
|
||||
|
@ -56,6 +57,10 @@ def get_next_elapse(timer_name):
|
|||
'activates': parts.group(12)
|
||||
}
|
||||
return timer_info, None
|
||||
except Exception:
|
||||
print(output)
|
||||
traceback.print_exc()
|
||||
sys.exit(nagios.STATE_UNKNOWN)
|
||||
return None, ValueError('Timer not found')
|
||||
except subprocess.CalledProcessError as e:
|
||||
return None, e
|
||||
|
|
Loading…
Reference in New Issue