Commit 55ff8254 authored by ibuler's avatar ibuler

[Bugfix] 修复任务执行args为空的bug

parent a99d5609
......@@ -165,6 +165,8 @@ class AdHocRunner:
)
def clean_args(self, module, args):
if not args:
return ''
if module not in self.command_modules_choices:
return args
if isinstance(args, str):
......
......@@ -229,7 +229,7 @@ class AdHoc(models.Model):
history.result = raw
history.summary = summary
return raw, summary
except IndexError as e:
except Exception as e:
return {}, {"dark": {"all": str(e)}, "contacted": []}
finally:
# f.close()
......
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