shell_command: reset tracking attributes in run()
Clear partial output and cancelled attributes prior to each call of run(). This allows a command to be cleanly run again after a failure. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
6bf4ef8b00
commit
b5394228ef
|
@ -46,6 +46,8 @@ class ShellCommand:
|
||||||
|
|
||||||
async def run(self, timeout=2., verbose=True):
|
async def run(self, timeout=2., verbose=True):
|
||||||
self.return_code = fd = None
|
self.return_code = fd = None
|
||||||
|
self.partial_output = b""
|
||||||
|
self.cancelled = False
|
||||||
if timeout is None:
|
if timeout is None:
|
||||||
# Never timeout
|
# Never timeout
|
||||||
timeout = 9999999999999999.
|
timeout = 9999999999999999.
|
||||||
|
|
Loading…
Reference in New Issue