Add error handling to exec command and fix minor bug in cleaning up relays
This commit is contained in:
@@ -7,7 +7,12 @@ class ExecCommand:
|
||||
def exec(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
||||
if authed:
|
||||
if length > 1:
|
||||
info(str(exec(" ".join(spl[1:]))))
|
||||
try:
|
||||
rtrn = exec(" ".join(spl[1:]))
|
||||
except Exception as err:
|
||||
failure(str(err))
|
||||
return
|
||||
info(str(rtrn))
|
||||
return
|
||||
else:
|
||||
incUsage("exec")
|
||||
|
||||
Reference in New Issue
Block a user