From f063832bc6361bcd6921b90dc25075bbb586f18e Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Mon, 23 Dec 2019 11:22:46 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=94=AF=E6=8C=81Windows=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=91=BD=E4=BB=A42?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/models/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ops/models/command.py b/apps/ops/models/command.py index 13e3c1714..9ce44e20f 100644 --- a/apps/ops/models/command.py +++ b/apps/ops/models/command.py @@ -63,7 +63,7 @@ class CommandExecution(models.Model): if ok: runner = CommandRunner(self.inventory) try: - host = self.hosts[0] + host = self.hosts.first() if host.is_windows(): shell = 'win_shell' else: