fix(command): 修复批量命令执行可能获取到host为None的问题

pull/5019/head
Bai 2020-11-16 18:22:07 +08:00 committed by 老广
parent cbcefe8bd3
commit cf1fbabca1
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ class CommandExecution(OrgModelMixin):
runner = CommandRunner(self.inventory)
try:
host = self.hosts.first()
if host.is_windows():
if host and host.is_windows():
shell = 'win_shell'
else:
shell = 'shell'