Commit 1c343974 by rfkelly0

WatchableFile: don't bother calling del_watcher is python is dying

parent 69febc23
...@@ -255,7 +255,9 @@ class WatchedFile(object): ...@@ -255,7 +255,9 @@ class WatchedFile(object):
self.mode = mode self.mode = mode
def __del__(self): def __del__(self):
self.close() # Don't bother if python if being torn down
if Watcher is not None:
self.close()
def __getattr__(self,name): def __getattr__(self,name):
file = self.__dict__['file'] file = self.__dict__['file']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment