summaryrefslogtreecommitdiff
path: root/fs/base.py
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2012-02-25 13:59:56 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2012-02-25 13:59:56 +0000
commitdce02cb0bcd67b82ddb909d58c39ec7524a3a133 (patch)
treea6b33623e17d2354ae1a533b63aa546ea91a7d82 /fs/base.py
parenta1fd0b385fc19d380e55652887ec97998339f959 (diff)
downloadpyfilesystem-dce02cb0bcd67b82ddb909d58c39ec7524a3a133.tar.gz
Fix for annoying shutdown warning
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@759 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/base.py')
-rw-r--r--fs/base.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/base.py b/fs/base.py
index 35fa22f..cb10336 100644
--- a/fs/base.py
+++ b/fs/base.py
@@ -162,8 +162,8 @@ class FS(object):
"""
- super(FS, self).__init__()
self.closed = False
+ super(FS, self).__init__()
self.thread_synchronize = thread_synchronize
if thread_synchronize:
self._lock = threading.RLock()
@@ -174,8 +174,11 @@ class FS(object):
return self.__str__()
def __del__(self):
- if not getattr(self, 'closed', True):
- self.close()
+ if not getattr(self, 'closed', False):
+ try:
+ self.close()
+ except:
+ pass
def __enter__(self):
return self