mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2024-12-22 00:50:12 +00:00
Handle FileNotFoundError
I'm guessing watchdog's behaviour changed in an update, as the error thrown when the watched directory doesn't exist is now "FileNotFoundError" instead of "NotADirectoryError". It'll handle either one now.
This commit is contained in:
parent
95989840f1
commit
d5ce6d31c5
@ -19,7 +19,8 @@ class Watcher:
|
||||
self.observer.schedule(event_handler, self.dir, recursive=True)
|
||||
try:
|
||||
self.observer.start()
|
||||
except NotADirectoryError:
|
||||
except (NotADirectoryError,
|
||||
FileNotFoundError):
|
||||
log.error(f"Directory {self.dir} does not exist")
|
||||
try:
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user