Commit 2dbaebc5 authored by Sebastien Robin's avatar Sebastien Robin

transfer status_dict strings using xmlrpclib.Binary

This fix issues when we transfer characters not allowed in xml
parent 19fed99f
......@@ -30,9 +30,15 @@ def makeSuite(node_quantity=None, test_suite=None, revision=None,
def safeRpcCall(function, *args):
retry = 64
xmlrpc_arg_list = []
for argument in args:
if isinstance(argument, dict):
argument = dict([(x, isinstance(y,str) and xmlrpclib.Binary(y) or y) \
for (x,y) in argument.iteritems()])
xmlrpc_arg_list.append(argument)
while True:
try:
return function(*args)
return function(*xmlrpc_arg_list)
except (socket.error, xmlrpclib.ProtocolError), e:
print >>sys.stderr, e
pprint.pprint(args, file(function._Method__name, 'w'))
......@@ -94,4 +100,4 @@ def main():
suite.start(test[1], lambda status_dict, __test_path=test[0]:
safeRpcCall(master.stopUnitTest, __test_path, status_dict))
elif not suite.running:
break
\ No newline at end of file
break
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment