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
b63c5045
Commit
b63c5045
authored
Dec 28, 2010
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix raising of non-FSError errors in RPCFS
parent
48231637
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
fs/rpcfs.py
+4
-2
No files found.
fs/rpcfs.py
View file @
b63c5045
...
...
@@ -8,6 +8,7 @@ class from the :mod:`fs.expose.xmlrpc` module.
"""
import
sys
import
xmlrpclib
import
socket
...
...
@@ -24,8 +25,6 @@ def re_raise_faults(func):
try
:
return
func
(
*
args
,
**
kwds
)
except
xmlrpclib
.
Fault
,
f
:
#import traceback
#traceback.print_exc()
# Make sure it's in a form we can handle
bits
=
f
.
faultString
.
split
(
" "
)
if
bits
[
0
]
not
in
[
"<type"
,
"<class"
]:
...
...
@@ -38,7 +37,10 @@ def re_raise_faults(func):
cls
=
_object_by_name
(
cls
)
# Re-raise using the remainder of the fault code as message
if
cls
:
if
issubclass
(
cls
,
FSError
):
raise
cls
(
''
,
msg
=
msg
)
else
:
raise
cls
(
msg
)
raise
f
except
socket
.
error
,
e
:
raise
RemoteConnectionError
(
str
(
e
),
details
=
e
)
...
...
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