aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift-gtk/statusicon.py
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2014-12-18 21:36:55 -0500
committerJon Lund Steffensen <jonlst@gmail.com>2014-12-18 21:36:55 -0500
commita34f948d53e1e08d227f307259df66cc8ddc8947 (patch)
tree0d7b1f647d78fadfa6401d01b02288b6dccd850d /src/redshift-gtk/statusicon.py
parentredshift-gtk: Remove unnecessary semi-colons at end-of-line (diff)
downloadredshift-ng-a34f948d53e1e08d227f307259df66cc8ddc8947.tar.gz
redshift-ng-a34f948d53e1e08d227f307259df66cc8ddc8947.tar.bz2
redshift-ng-a34f948d53e1e08d227f307259df66cc8ddc8947.tar.xz
redshift-gtk: Ignore exception in termwait when child is gone
The termwait method is used to wait until the child process has quit. Previously this would fail with an exception if the child has already quit. This is now ignored.
Diffstat (limited to 'src/redshift-gtk/statusicon.py')
-rw-r--r--src/redshift-gtk/statusicon.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py
index aa21750..0981abf 100644
--- a/src/redshift-gtk/statusicon.py
+++ b/src/redshift-gtk/statusicon.py
@@ -357,8 +357,12 @@ class RedshiftStatusIcon(object):
return True
def termwait(self):
- os.kill(self.process[0], signal.SIGINT)
- os.waitpid(self.process[0], 0)
+ try:
+ os.kill(self.process[0], signal.SIGINT)
+ os.waitpid(self.process[0], 0)
+ except ProcessLookupError:
+ # Process has apparently already disappeared
+ pass
def run():