Fix issue #19
This commit is contained in:
parent
49c7880e6a
commit
d82ad55113
1 changed files with 6 additions and 2 deletions
|
|
@ -571,8 +571,12 @@ def wait_for_process(name, poll_rate=3):
|
||||||
sleep(poll_rate)
|
sleep(poll_rate)
|
||||||
running = False
|
running = False
|
||||||
for proc in psutil.process_iter():
|
for proc in psutil.process_iter():
|
||||||
|
try:
|
||||||
if re.search(r'^{}'.format(name), proc.name(), re.IGNORECASE):
|
if re.search(r'^{}'.format(name), proc.name(), re.IGNORECASE):
|
||||||
running = True
|
running = True
|
||||||
|
except psutil._exceptions.NoSuchProcess:
|
||||||
|
# Assuming process closed during iteration
|
||||||
|
pass
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
# global_vars functions
|
# global_vars functions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue