Skip to content
Snippets Groups Projects
Commit ceac8e53 authored by Florent Aide's avatar Florent Aide
Browse files

fix an exception is no value is present in json payload

parent c9d94890
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@
result = sender.send()
resultparser = ResultParser(result)
index = 0
for index, item in enumerate(resultparser.parse_result()):
success, info = item
if not success:
......
import ijson
from decimal import Decimal
class Reader(object):
......@@ -8,4 +9,10 @@
def read(self):
for dic in self.objects:
for k, v in dic.iteritems():
# scan the result to cast all decimals into float...
# because XMLRPC-LIB cannot send Decimal
if isinstance(v, Decimal):
dic[k] = float(v)
yield dic
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment