From f204e93c460eff01ae9bae8d3bc87aed70bcd551 Mon Sep 17 00:00:00 2001 From: JsBergbau <37013344+JsBergbau@users.noreply.github.com> Date: Sat, 4 Apr 2020 12:30:24 +0000 Subject: [PATCH] Bugfix with --count option --- LYWSD03MMC.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LYWSD03MMC.py b/LYWSD03MMC.py index 6c296b2..819d332 100644 --- a/LYWSD03MMC.py +++ b/LYWSD03MMC.py @@ -310,7 +310,7 @@ def connect(): bluepypid=re.findall(r'bluepy-helper\((.*)\)',pstree)[0] #Store the bluepypid, to kill it later except IndexError: #Should normally occur because we're disconnected logging.debug("Couldn't find pid of bluepy-helper") - if bluepypid == 0: + if bluepypid != 0: os.system("kill " + bluepypid) logging.debug("Killed bluepy with pid: " + str(bluepypid)) os._exit(0)