Commit 28c6f318 authored by Benjamin Berg's avatar Benjamin Berg
Browse files

tests: Fix close of invalid file descriptor

The file descriptor may have been closed (and set to -1) already, catch
this.
parent eba846d8
......@@ -67,7 +67,8 @@ class OutputChecker(object):
continue
# We get a bad file descriptor error when the outside closes the FD
os.close(self._pipe_fd_r)
if self._pipe_fd_r >= 0:
os.close(self._pipe_fd_r)
self._pipe_fd_r = -1
self._lines_sem.release()
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment