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
fdeae943
Commit
fdeae943
authored
Sep 28, 2009
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust other classes now that FS has a base "close" method
parent
3b622389
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
17 deletions
+9
-17
fs/__init__.py
+1
-1
fs/expose/fuse/__init__.py
+6
-8
fs/tempfs.py
+1
-3
fs/wrapfs.py
+1
-2
fs/zipfs.py
+0
-3
No files found.
fs/__init__.py
View file @
fdeae943
...
...
@@ -15,7 +15,7 @@ implementations of this interface such as:
"""
__version__
=
"0.2.0a
4
"
__version__
=
"0.2.0a
5
"
__author__
=
"Will McGugan (will@willmcgugan.com)"
# 'base' imports * from 'path' and 'errors', so their
...
...
fs/expose/fuse/__init__.py
View file @
fdeae943
...
...
@@ -488,10 +488,9 @@ class MountProcess(subprocess.Popen):
"""Perform the specified mount, return without waiting."""
(
fs
,
path
,
opts
)
=
pickle
.
loads
(
data
)
opts
[
"foreground"
]
=
True
if
hasattr
(
fs
,
"close"
):
def
unmount_callback
():
fs
.
close
()
opts
[
"unmount_callback"
]
=
unmount_callback
def
unmount_callback
():
fs
.
close
()
opts
[
"unmount_callback"
]
=
unmount_callback
mount
(
fs
,
path
,
*
opts
)
@staticmethod
...
...
@@ -506,10 +505,9 @@ class MountProcess(subprocess.Popen):
os
.
write
(
w
,
"S"
)
os
.
close
(
w
)
opts
[
"ready_callback"
]
=
ready_callback
if
hasattr
(
fs
,
"close"
):
def
unmount_callback
():
fs
.
close
()
opts
[
"unmount_callback"
]
=
unmount_callback
def
unmount_callback
():
fs
.
close
()
opts
[
"unmount_callback"
]
=
unmount_callback
try
:
mount
(
fs
,
path
,
**
opts
)
except
Exception
:
...
...
fs/tempfs.py
View file @
fdeae943
...
...
@@ -49,8 +49,6 @@ class TempFS(OSFS):
self
.
_cleaned
=
True
finally
:
self
.
_lock
.
release
()
def
__del__
(
self
):
self
.
close
()
super
(
TempFS
,
self
)
.
close
()
fs/wrapfs.py
View file @
fdeae943
...
...
@@ -233,8 +233,7 @@ class WrapFS(FS):
@rewrite_errors
def
close
(
self
):
if
hasattr
(
self
.
wrapped_fs
,
"close"
):
self
.
wrapped_fs
.
close
()
self
.
wrapped_fs
.
close
()
def
wrap_fs_methods
(
decorator
,
cls
=
None
,
exclude
=
[]):
"""Apply the given decorator to all FS methods on the given class.
...
...
fs/zipfs.py
View file @
fdeae943
...
...
@@ -116,9 +116,6 @@ class ZipFS(FS):
self
.
zf
.
close
()
self
.
zf
=
_ExceptionProxy
()
def
__del__
(
self
):
self
.
close
()
@synchronize
def
open
(
self
,
path
,
mode
=
"r"
,
**
kwargs
):
path
=
normpath
(
path
)
...
...
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