def __call__(self, *args): for retry in range(self.max_retries): try: return _Method.__call__(self, *args) except xmlrpclib.ProtocolError, err: self.log.error("Server failure: Protocol Error: %s %s" % \ (err.errcode, err.errmsg)) raise xmlrpclib.Fault(20, "Server Failure") except xmlrpclib.Fault: raise
def __call__(self, *args): #print "In Retry Version" for retry in range(self.max_retries): try: retval = _Method.__call__(self, *args) #print "returned: retval = %s" % retval return retval except xmlrpclib.ProtocolError, err: log.error("Server failure: Protocol Error: %s %s" % \ (err.errcode, err.errmsg)) raise xmlrpclib.Fault(20, "Server Failure") except xmlrpclib.Fault as fault: raise
def __call__(self, *args): max_retries = 4 for retry in range(max_retries): try: return _Method.__call__(self, *args) except xmlrpclib.ProtocolError: log.error("Server failure: Protocol Error") raise xmlrpclib.Fault(20, "Server Failure") except socket.error, (err, msg): if retry == 3: log.error("Server failure: %s" % msg) raise xmlrpclib.Fault(20, msg) except tlslite.errors.TLSError, err: log.error("Unexpected TLS Error: %s. Retrying" % \ (err.args[0]))