diff --git a/rtslib/utils.py b/rtslib/utils.py index 692d578..570113c 100644 --- a/rtslib/utils.py +++ b/rtslib/utils.py @@ -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):