fix bug
This commit is contained in:
parent
ca92c831de
commit
41b11a9ade
@ -98,7 +98,10 @@ class ProcessManager:
|
|||||||
self.task = self.loop.create_task(self.run_cmd())
|
self.task = self.loop.create_task(self.run_cmd())
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
assert self.state == ProcessManagerState.RUNNING, "process manager is not running"
|
if self.state != ProcessManagerState.RUNNING:
|
||||||
|
logging.debug(
|
||||||
|
"trying to stop a process manager that is not running")
|
||||||
|
return
|
||||||
self.state = ProcessManagerState.IDLE
|
self.state = ProcessManagerState.IDLE
|
||||||
self.task.cancel()
|
self.task.cancel()
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user