diff options
Diffstat (limited to 'fs/wrapfs/__init__.py')
-rw-r--r-- | fs/wrapfs/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/wrapfs/__init__.py b/fs/wrapfs/__init__.py index 556f522..7b9d1af 100644 --- a/fs/wrapfs/__init__.py +++ b/fs/wrapfs/__init__.py @@ -18,6 +18,7 @@ standard unix shell functionality of hiding dot-files in directory listings. import re import sys import fnmatch +import threading from fs.base import FS, threading, synchronize, NoDefaultMeta from fs.errors import * @@ -65,11 +66,11 @@ class WrapFS(FS): """ def __init__(self, fs): - super(WrapFS,self).__init__() + super(WrapFS, self).__init__() try: self._lock = fs._lock - except (AttributeError,FSError): - self._lock = None + except (AttributeError,FSError): + self._lock = self._lock = threading.RLock() self.wrapped_fs = fs def _file_wrap(self, f, mode): |