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
e9042dcd
Commit
e9042dcd
authored
Jan 05, 2012
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made opener return an OSFS rather thatn an SubFS, where appropriate
parent
17c597e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
fs/opener.py
+5
-1
No files found.
fs/opener.py
View file @
e9042dcd
...
@@ -67,6 +67,7 @@ __all__ = ['OpenerError',
...
@@ -67,6 +67,7 @@ __all__ = ['OpenerError',
'HTTPOpener'
]
'HTTPOpener'
]
from
fs.path
import
pathsplit
,
join
,
iswildcard
,
normpath
from
fs.path
import
pathsplit
,
join
,
iswildcard
,
normpath
from
fs.osfs
import
OSFS
from
fs.filelike
import
FileWrapper
from
fs.filelike
import
FileWrapper
from
os
import
getcwd
from
os
import
getcwd
import
os.path
import
os.path
...
@@ -290,8 +291,11 @@ class OpenerRegistry(object):
...
@@ -290,8 +291,11 @@ class OpenerRegistry(object):
"""
"""
fs
,
path
=
self
.
parse
(
fs_url
,
writeable
=
writeable
,
create_dir
=
create_dir
)
fs
,
path
=
self
.
parse
(
fs_url
,
writeable
=
writeable
,
create_dir
=
create_dir
)
if
path
and
'://'
not
in
fs_url
:
# A shortcut to return an OSFS rather than a SubFS for os paths
return
OSFS
(
fs_url
)
if
path
:
if
path
:
return
fs
.
opendir
(
path
)
fs
=
fs
.
opendir
(
path
)
return
fs
return
fs
...
...
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