Skip to content

Commit 3ea45e8

Browse files
committed
ignore logging also for OSError
1 parent 12c2799 commit 3ea45e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/specsanalyzer/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def setup_logging(
6767

6868
# Add file handler to logger
6969
base_logger.addHandler(file_handler)
70-
except PermissionError:
70+
except (OSError, PermissionError):
7171
logging.warning(f"Cannot create logfile in Folder {user_log_path}, disabling logfile.")
7272
base_logger.addHandler(logging.NullHandler())
7373
base_logger.propagate = False

0 commit comments

Comments
 (0)