mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-22 08:19:04 +00:00
[Bugfix] 修复任务执行args为空的bug
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user