Skip to content

Commit 541342f

Browse files
committed
Patch #764470: Fix marshalling of faults. Will backport to 2.2.
1 parent 162f081 commit 541342f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Lib/xmlrpclib.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
# 2002-05-15 fl Added error constants (from Andrew Kuchling)
4545
# 2002-06-27 fl Merged with Python CVS version
4646
# 2002-10-22 fl Added basic authentication (based on code from Phillip Eby)
47+
# 2003-01-22 sm Add support for the bool type
48+
# 2003-02-27 gvr Remove apply calls
49+
# 2003-04-24 sm Use cStringIO if available
50+
# 2003-04-25 ak Add support for nil
51+
# 2003-06-15 gn Add support for time.struct_time
52+
# 2003-07-12 gp Correct marshalling of Faults
4753
#
4854
# Copyright (c) 1999-2002 by Secret Labs AB.
4955
# Copyright (c) 1999-2002 by Fredrik Lundh.
@@ -581,7 +587,9 @@ def dumps(self, values):
581587
if isinstance(values, Fault):
582588
# fault instance
583589
write("<fault>\n")
584-
dump(vars(values), write)
590+
dump({'faultCode': values.faultCode,
591+
'faultString': values.faultString},
592+
write)
585593
write("</fault>\n")
586594
else:
587595
# parameter block

0 commit comments

Comments
 (0)