xmlrpcplus: use parent's int marshalling if possible

If we have an int value between xmlrpc.MININT and xmlrpc.MAXINT, we can
rely on stdlib's xmlrpc.Marshaller. This allows us to drop this custom
code.
This commit is contained in:
Ken Dreyer 2017-12-13 15:58:40 -07:00 committed by Tomas Kopecek
parent 41d9a61088
commit aa35b84c8c

View file

@ -47,9 +47,7 @@ class ExtendedMarshaller(xmlrpc_client.Marshaller):
write(str(int(value)))
write("</i8></value>\n")
else:
write("<value><int>")
write(str(int(value)))
write("</int></value>\n")
return xmlrpc_client.Marshaller.dump_int(self, value, write)
dispatch[int] = dump_int
# we always want to allow None