diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-07-22 14:57:30 +0200 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2021-07-22 14:58:26 +0200 |
commit | 25374412a610ab473a937562e34c48ea0992c60a (patch) | |
tree | ec5a06d599de20c54b9844e558278d0af1c22fcc /tests | |
parent | 67391a94519fccd3cae8c791d10bc638991ed713 (diff) | |
download | gnome-settings-daemon-25374412a610ab473a937562e34c48ea0992c60a.tar.gz |
tests: Fix OutputChecker trying to close FD -1
This can happen if the watched process has terminated already.
Reported-By: Bastien Nocera <hadess@hadess.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/output_checker.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/output_checker.py b/tests/output_checker.py index 1680c2dc..265e3234 100644 --- a/tests/output_checker.py +++ b/tests/output_checker.py @@ -177,7 +177,8 @@ class OutputChecker(object): fd = self._pipe_fd_r self._pipe_fd_r = -1 - os.close(fd) + if fd >= 0: + os.close(fd) self._thread.join() |