From ceba689868db9cc6b8738f5e876be4806e074330 Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 6 Sep 2021 18:39:42 +0800 Subject: [PATCH] fix issue --- spug_api/libs/ssh.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spug_api/libs/ssh.py b/spug_api/libs/ssh.py index 3ea87cdf..50db0309 100644 --- a/spug_api/libs/ssh.py +++ b/spug_api/libs/ssh.py @@ -82,6 +82,8 @@ def exec_command_with_stream(self, command, environment=None): exit_code, line = -1, '' while True: line = channel.recv(8196).decode() + if not line: + break match = self.regex.search(line) if match: exit_code = int(line.rsplit()[-1])