diff options
author | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-11-20 18:04:23 +0000 |
---|---|---|
committer | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-11-20 18:04:23 +0000 |
commit | 838d94c3f7bf27de847d40164724f59f33a7682b (patch) | |
tree | a4449d264b612fc04e946a5f19ed6dcbe998f0f6 /fs/wrapfs | |
parent | e4fe27c2dcb3e3540e0fb91b9cba40db2a66f06d (diff) | |
download | pyfilesystem-git-838d94c3f7bf27de847d40164724f59f33a7682b.tar.gz |
Fixed getmeta/hasmeta, added documentation and tests
Diffstat (limited to 'fs/wrapfs')
-rw-r--r-- | fs/wrapfs/__init__.py | 4 | ||||
-rw-r--r-- | fs/wrapfs/readonlyfs.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/fs/wrapfs/__init__.py b/fs/wrapfs/__init__.py index bc55158..0bb5c73 100644 --- a/fs/wrapfs/__init__.py +++ b/fs/wrapfs/__init__.py @@ -19,7 +19,7 @@ import re import sys import fnmatch -from fs.base import FS, threading, synchronize +from fs.base import FS, threading, synchronize, NoDefaultMeta from fs.errors import * from fs.path import * from fs.local_functools import wraps @@ -118,7 +118,7 @@ class WrapFS(FS): return (mode,mode) @rewrite_errors - def getmeta(self, meta_name, default=Ellipsis): + def getmeta(self, meta_name, default=NoDefaultMeta): return self.wrapped_fs.getmeta(meta_name, default) @rewrite_errors diff --git a/fs/wrapfs/readonlyfs.py b/fs/wrapfs/readonlyfs.py index 907d25c..61a1466 100644 --- a/fs/wrapfs/readonlyfs.py +++ b/fs/wrapfs/readonlyfs.py @@ -6,6 +6,7 @@ An FS wrapper class for blocking operations that would modify the FS. """ +from fs.base import NoDefaultMeta from fs.wrapfs import WrapFS from fs.errors import UnsupportedError, NoSysPathError @@ -20,7 +21,7 @@ class ReadOnlyFS(WrapFS): """ - def getmeta(self, meta_name, default=Ellipsis): + def getmeta(self, meta_name, default=NoDefaultMeta): if meta_name == 'read_only': return True return self.wrapped_fs(meta_name, default) |