shell_command: reset internal proc state in "run_with_response"

This sets a clean state should a shell command be run more than once.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine committed 2021-03-04 08:45:31 -05:00
1 parent cea9af1ef8
commit 22a5f6720c
1 file changed
+2
+2
View File
@@ -107,6 +107,8 @@ class ShellCommand:
return self._check_proc_success(complete)
async def run_with_response(self, timeout=2., retries=1):
self.return_code = self.proc = None
self.cancelled = False
while retries > 0:
stdout = stderr = None
if await self._create_subprocess():