Skip to content

Commit

Permalink
Silently ignore OSError on close
Browse files Browse the repository at this point in the history
  • Loading branch information
gjsd2 authored Jul 26, 2024
1 parent 1fb8db1 commit c523861
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 c523861

Please # to comment.