Commit de91c1ff authored by Vincent Pelletier's avatar Vincent Pelletier

Catch all RPC exceptions.

Test runner should not die because of any RPC-related failure.
Also, print a nice traceback of the error.
parent d413f619
...@@ -7,6 +7,7 @@ import subprocess ...@@ -7,6 +7,7 @@ import subprocess
import sys import sys
import socket import socket
import pprint import pprint
import traceback
from SlapOSControler import SlapOSControler from SlapOSControler import SlapOSControler
...@@ -49,8 +50,8 @@ def safeRpcCall(function, *args): ...@@ -49,8 +50,8 @@ def safeRpcCall(function, *args):
while True: while True:
try: try:
return function(*args) return function(*args)
except (socket.error, xmlrpclib.ProtocolError), e: except:
print >>sys.stderr, e traceback.print_exc()
pprint.pprint(args, file(function._Method__name, 'w')) pprint.pprint(args, file(function._Method__name, 'w'))
time.sleep(retry) time.sleep(retry)
retry += retry >> 1 retry += retry >> 1
......
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