- Timestamp:
- Mar 18, 2010 8:45:28 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- bdf00d5
- Parents:
- 1dcaff4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/remote_service.py
r1dcaff4 r114d24b 274 274 class service_caller(remote_service_base): 275 275 def __init__(self, service_name, request_message=None, 276 request_body_name=None, tracefile=None, strict=True): 276 request_body_name=None, tracefile=None, strict=True, 277 log=None): 277 278 self.service_name = service_name 278 279 … … 303 304 self.__call__ = self.call_service 304 305 self.max_retries = 5 306 self.log = log 305 307 306 308 def serialize_soap(self, req): … … 366 368 "Cannot connect to %s: %s" % (url, e[1])) 367 369 except BIOError, e: 368 print "BIO error contacting %s: %s" % (url, e.message) 370 if self.log: 371 self.log.warn("BIO error contacting %s: %s" % (url, e)) 369 372 retries += 1 370 373 except SSLError, e: 371 print "SSL error contacting %s: %s" % (url, e.message) 374 if self.log: 375 self.log.warn("SSL error contacting %s: %s" % (url, e)) 372 376 retries += 1 373 377 except httplib.HTTPException, e: 374 print "HTTP error contacting %s: %s" % (url, e.message) 378 if self.log: 379 self.log.warn("HTTP error contacting %s: %s" % (url, e)) 375 380 retries +=1 376 381 except Fault, f: … … 444 449 "Cannot connect to %s: %s" % (url, e[1])) 445 450 except BIOError, e: 446 print "BIO error contacting %s: %s" % (url, e.message) 451 if self.log: 452 self.log.warn("BIO error contacting %s: %s" % (url, e)) 447 453 retries += 1 448 454 except SSLError, e: 449 print "SSL error contacting %s: %s" % (url, e.message) 455 if self.log: 456 self.log.warn("SSL error contacting %s: %s" % (url, e)) 450 457 retries += 1 451 458 except httplib.HTTPException, e: 452 print "HTTP error contacting %s: %s" % (url, e.message) 459 if self.log: 460 self.log.warn("HTTP error contacting %s: %s" % (url, e)) 453 461 retries +=1 454 462 except ParseException, e:
Note: See TracChangeset
for help on using the changeset viewer.