diff options
author | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2012-02-25 13:59:56 +0000 |
---|---|---|
committer | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2012-02-25 13:59:56 +0000 |
commit | dce02cb0bcd67b82ddb909d58c39ec7524a3a133 (patch) | |
tree | a6b33623e17d2354ae1a533b63aa546ea91a7d82 /fs/base.py | |
parent | a1fd0b385fc19d380e55652887ec97998339f959 (diff) | |
download | pyfilesystem-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.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |