Skip to content

Commit

Permalink
Remove None returned from is_locked
Browse files Browse the repository at this point in the history
  • Loading branch information
getBoolean committed Mar 26, 2024
1 parent a705cfb commit cd1f314
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jln2kavita.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
]


def is_locked(filepath: str) -> bool | None:
def is_locked(filepath: str) -> bool:
"""Checks if a file is locked by opening it in append mode.
If no exception thrown, then the file is not locked.
Source: https://www.calazan.com/how-to-check-if-a-file-is-locked-in-python/
"""
locked = None
locked = False
if os.path.exists(filepath):
try:
buffer_size = 8
Expand Down

0 comments on commit cd1f314

Please sign in to comment.