Commit 1c343974 by rfkelly0

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

parent 69febc23
...@@ -255,6 +255,8 @@ class WatchedFile(object): ...@@ -255,6 +255,8 @@ class WatchedFile(object):
self.mode = mode self.mode = mode
def __del__(self): def __del__(self):
# Don't bother if python if being torn down
if Watcher is not None:
self.close() self.close()
def __getattr__(self,name): def __getattr__(self,name):
......
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