Skip to content

Commit

Permalink
Merge pull request #199 from gjsd2/quiet-tape-pscsi
Browse files Browse the repository at this point in the history
Silently ignore OSError on os.close()
  • Loading branch information
maurizio-lombardi authored Oct 7, 2024
2 parents a03594b + c523861 commit 05f6941
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rtslib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def is_dev_in_use(path):
except OSError:
return True
else:
os.close(file_fd)
try:
os.close(file_fd)
except OSError:
pass
return False

def _get_size_for_dev(device):
Expand Down

0 comments on commit 05f6941

Please sign in to comment.