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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user