Convert None into False for XML-RPC
This commit is contained in:
1 parent
a25b8a11a8
commit
5b37a3b9dd
1 file changed
+3
-1
@@ -16,7 +16,9 @@ import os
|
||||
# convert decimal to float before marshalling:
|
||||
from decimal import Decimal
|
||||
xmlrpclib.Marshaller.dispatch[Decimal] = \
|
||||
lambda self, value, write: self.dump_long(float(value), write)
|
||||
lambda self, value, write: self.dump_long(float(value), write)
|
||||
xmlrpclib.Marshaller.dispatch[type(None)] = \
|
||||
lambda self, value, write: self.dump_bool(bool(value), write)
|
||||
|
||||
|
||||
class GenericXMLRPCRequestHandler:
|
||||
|
||||
Reference in new issue
Block a user