Commit 6fe4c8d7 authored by Jameson Rollins's avatar Jameson Rollins

guardctrl: attempt at better error handling for enable

parent 97f476e1
Pipeline #142600 passed with stage
in 2 minutes and 12 seconds
......@@ -180,7 +180,10 @@ def enable_nodes(nodes, now=False):
cmd = ['enable']
if now:
cmd += ['--now']
systemctl_cmd(*cmd, nodes=nodes)
try:
systemctl_cmd(*cmd, nodes=nodes)
except SystemctlError as e:
raise util.GuardCtrlError("Failed to enable node: {}".format(e.stderr))
util.update_global_chanfile(list(list_nodes()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment