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:
parent
cea9af1ef8
commit
22a5f6720c
|
@ -107,6 +107,8 @@ class ShellCommand:
|
||||||
return self._check_proc_success(complete)
|
return self._check_proc_success(complete)
|
||||||
|
|
||||||
async def run_with_response(self, timeout=2., retries=1):
|
async def run_with_response(self, timeout=2., retries=1):
|
||||||
|
self.return_code = self.proc = None
|
||||||
|
self.cancelled = False
|
||||||
while retries > 0:
|
while retries > 0:
|
||||||
stdout = stderr = None
|
stdout = stderr = None
|
||||||
if await self._create_subprocess():
|
if await self._create_subprocess():
|
||||||
|
|
Loading…
Reference in New Issue