Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
93dfee1d
Commit
93dfee1d
authored
Oct 30, 2011
by
Florent Xicluna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #13293: Better error message when trying to marshal bytes using xmlrpc.client.
parent
c4fec937
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
Lib/xmlrpc/client.py
Lib/xmlrpc/client.py
+1
-9
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/xmlrpc/client.py
View file @
93dfee1d
...
...
@@ -503,9 +503,7 @@ class Marshaller:
f
=
self
.
dispatch
[
type
(
value
)]
except
KeyError
:
# check if this object can be marshalled as a structure
try
:
value
.
__dict__
except
:
if
not
hasattr
(
value
,
'__dict__'
):
raise
TypeError
(
"cannot marshal %s objects"
%
type
(
value
))
# check if this class is a sub-class of a basic type,
# because we don't know how to marshal these types
...
...
@@ -553,12 +551,6 @@ class Marshaller:
write
(
"</double></value>
\
n
"
)
dispatch
[
float
]
=
dump_double
def
dump_string
(
self
,
value
,
write
,
escape
=
escape
):
write
(
"<value><string>"
)
write
(
escape
(
value
))
write
(
"</string></value>
\
n
"
)
dispatch
[
bytes
]
=
dump_string
def
dump_unicode
(
self
,
value
,
write
,
escape
=
escape
):
write
(
"<value><string>"
)
write
(
escape
(
value
))
...
...
Misc/NEWS
View file @
93dfee1d
...
...
@@ -63,6 +63,9 @@ Core and Builtins
Library
-------
- Issue #13293: Better error message when trying to marshal bytes using
xmlrpc.client.
- Issue #13291: NameError in xmlrpc package.
- Issue #13258: Use callable() built-in in the standard library.
...
...
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