I am happily using the watchdog package, specifically PollingObserver,
to watch directories for file events. It works great - until the
directory I am watching is deleted. What then happens is the code that
is polling the directory calls stat() on a non-existent
directory, and raises an exception. What is the best way to handle
this? I don't see how I can catch this exception as it's in a separate
I wonder if it would make sense for DirectorySnapshot to be None if the directory does not (or no longer) exists?