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.
This commit is contained in:
Jon Lund Steffensen
2014-12-18 21:36:55 -05:00
parent 86e15af8b1
commit a34f948d53
+6 -2
View File
@@ -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():