Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
0a533ceb
Commit
0a533ceb
authored
Dec 05, 2009
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trap lookups of known attributes in __getattr__
parent
b8add3a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
fs/wrapfs.py
+5
-1
No files found.
fs/wrapfs.py
View file @
0a533ceb
...
@@ -225,13 +225,17 @@ class WrapFS(FS):
...
@@ -225,13 +225,17 @@ class WrapFS(FS):
raise
UnsupportedError
(
"listxattrs"
)
raise
UnsupportedError
(
"listxattrs"
)
def
__getattr__
(
self
,
attr
):
def
__getattr__
(
self
,
attr
):
if
attr
==
"closed"
:
return
False
if
attr
==
"wrapped_fs"
:
return
None
return
getattr
(
self
.
wrapped_fs
,
attr
)
return
getattr
(
self
.
wrapped_fs
,
attr
)
@rewrite_errors
@rewrite_errors
def
close
(
self
):
def
close
(
self
):
if
not
self
.
closed
:
if
not
self
.
closed
:
self
.
wrapped_fs
.
close
()
self
.
wrapped_fs
.
close
()
super
(
WrapFS
,
self
)
.
close
()
super
(
WrapFS
,
self
)
.
close
()
def
wrap_fs_methods
(
decorator
,
cls
=
None
,
exclude
=
[]):
def
wrap_fs_methods
(
decorator
,
cls
=
None
,
exclude
=
[]):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment