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
60941151
Commit
60941151
authored
Nov 20, 2010
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed getmeta for rpcfs
parent
838d94c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
fs/expose/xmlrpc.py
+11
-0
fs/rpcfs.py
+6
-5
No files found.
fs/expose/xmlrpc.py
View file @
60941151
...
@@ -42,6 +42,17 @@ class RPCFSInterface(object):
...
@@ -42,6 +42,17 @@ class RPCFSInterface(object):
"""Decode paths arriving over the wire."""
"""Decode paths arriving over the wire."""
return
path
.
decode
(
"base64"
)
.
decode
(
"utf8"
)
return
path
.
decode
(
"base64"
)
.
decode
(
"utf8"
)
def
getmeta
(
self
,
meta_name
):
meta
=
self
.
fs
.
getmeta
(
meta_name
)
return
meta
def
getmeta_default
(
self
,
meta_name
,
default
):
meta
=
self
.
fs
.
getmeta
(
meta_name
,
default
)
return
xmlrpclib
.
Binary
(
meta
)
def
hasmeta
(
self
,
meta_name
):
return
self
.
fs
.
hasmeta
(
meta_name
)
def
get_contents
(
self
,
path
):
def
get_contents
(
self
,
path
):
path
=
self
.
decode_path
(
path
)
path
=
self
.
decode_path
(
path
)
data
=
self
.
fs
.
getcontents
(
path
)
data
=
self
.
fs
.
getcontents
(
path
)
...
...
fs/rpcfs.py
View file @
60941151
...
@@ -145,13 +145,14 @@ class RPCFS(FS):
...
@@ -145,13 +145,14 @@ class RPCFS(FS):
return
path
.
decode
(
"base64"
)
.
decode
(
"utf8"
)
return
path
.
decode
(
"base64"
)
.
decode
(
"utf8"
)
def
getmeta
(
self
,
meta_name
,
default
=
NoDefaultMeta
):
def
getmeta
(
self
,
meta_name
,
default
=
NoDefaultMeta
):
if
meta_name
in
self
.
_meta
:
try
:
return
self
.
_meta
[
meta_name
]
return
self
.
proxy
.
getmeta
(
meta_name
)
return
self
.
proxy
.
getmeta
(
meta_name
,
default
)
except
NoMetaError
:
if
default
is
not
NoDefaultMeta
:
return
default
raise
def
hasmeta
(
self
,
meta_name
):
def
hasmeta
(
self
,
meta_name
):
if
meta_name
in
self
.
_meta
:
return
True
return
self
.
proxy
.
hasmeta
(
meta_name
)
return
self
.
proxy
.
hasmeta
(
meta_name
)
def
open
(
self
,
path
,
mode
=
"r"
):
def
open
(
self
,
path
,
mode
=
"r"
):
...
...
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