Skip to content

Commit

Permalink
fix: better handling of testing log write permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
danellecline committed Aug 22, 2024
1 parent ccf2601 commit 728b145
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sdcat/logger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def create_logger_file(prefix: str = "sdcat"):
try:
log_path.mkdir(parents=True, exist_ok=True)
test_file = log_path / "test.txt"
with open(test_file, "w") as f:
f.write("test")
test_file.touch()
test_file.unlink()
except PermissionError:
import tempfile
Expand Down

0 comments on commit 728b145

Please sign in to comment.