diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-14 00:11:58 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-14 00:11:58 +0100 |
commit | 0c7cec519e3fc5e29671d443f883ea1ab8dc7d60 (patch) | |
tree | f957fde96597f93b6e638ada1f493b084d5eab50 | |
parent | dist (diff) | |
download | blueshift-tray-0c7cec519e3fc5e29671d443f883ea1ab8dc7d60.tar.gz blueshift-tray-0c7cec519e3fc5e29671d443f883ea1ab8dc7d60.tar.bz2 blueshift-tray-0c7cec519e3fc5e29671d443f883ea1ab8dc7d60.tar.xz |
fix polling
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rwxr-xr-x | src/blueshift-tray.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blueshift-tray.py b/src/blueshift-tray.py index c611fc8..97cc75e 100755 --- a/src/blueshift-tray.py +++ b/src/blueshift-tray.py @@ -62,7 +62,7 @@ def term(count = 1, kill = False): process.send_signal(signal.SIGTERM) if count > 1: for i in range(count - 1): - if process.poll(): + if process.poll() is None: time.sleep(0.1) process.send_signal(signal.SIGTERM) if kill: @@ -175,6 +175,6 @@ finally: except KeyboardInterrupt: term() -if process.poll(): +if process.poll() is None: process.send_signal(signal.KILL) |