Skip to content

Commit

Permalink
Add exception handling for OSError that my be thrown by os.fsync
Browse files Browse the repository at this point in the history
We've seen instances where "Bad file descriptor" OSError was raised.
This looks similar to 52d69be.
Handle in the same way by ignoring the error and continuing execution.

Signed-off-by: Sebastian Mitterle <[email protected]>
  • Loading branch information
smitterl committed Sep 3, 2024
1 parent 18bebb9 commit 3ed11c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion avocado/utils/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def flush(self):
try:
fileno = stream.fileno()
os.fsync(fileno)
except UnsupportedOperation:
except UnsupportedOperation, OSError:
pass
if hasattr(handler, "close"):
handler.close()
Expand Down

0 comments on commit 3ed11c1

Please sign in to comment.