Commit 0b9877a0 by willmcgugan

Fix for annoying shutdown warning

parent 84931a65
...@@ -162,8 +162,8 @@ class FS(object): ...@@ -162,8 +162,8 @@ class FS(object):
""" """
super(FS, self).__init__()
self.closed = False self.closed = False
super(FS, self).__init__()
self.thread_synchronize = thread_synchronize self.thread_synchronize = thread_synchronize
if thread_synchronize: if thread_synchronize:
self._lock = threading.RLock() self._lock = threading.RLock()
...@@ -174,8 +174,11 @@ class FS(object): ...@@ -174,8 +174,11 @@ class FS(object):
return self.__str__() return self.__str__()
def __del__(self): def __del__(self):
if not getattr(self, 'closed', True): if not getattr(self, 'closed', False):
self.close() try:
self.close()
except:
pass
def __enter__(self): def __enter__(self):
return self return self
......
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