From a34f948d53e1e08d227f307259df66cc8ddc8947 Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Thu, 18 Dec 2014 21:36:55 -0500 Subject: 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. --- src/redshift-gtk/statusicon.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/redshift-gtk/statusicon.py') 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(): -- cgit v1.2.3-70-g09d2