MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / failed

Method failed

suds/client.py:707–728  ·  view source on GitHub ↗

Request failed, process reply based on reason @param binding: The binding to be used to process the reply. @type binding: L{suds.bindings.binding.Binding} @param error: The http error message @type error: L{transport.TransportError}

(self, binding, error)

Source from the content-addressed store, hash-verified

705 return (200, result)
706
707 def failed(self, binding, error):
708 """
709 Request failed, process reply based on reason
710 @param binding: The binding to be used to process the reply.
711 @type binding: L{suds.bindings.binding.Binding}
712 @param error: The http error message
713 @type error: L{transport.TransportError}
714 """
715 status, reason = (error.httpcode, suds.tostr(error))
716 reply = error.fp.read()
717 log.debug('http failed:\n%s', reply)
718 if status == 500:
719 if len(reply) > 0:
720 r, p = binding.get_fault(reply)
721 self.last_received(r)
722 return (status, p)
723 else:
724 return (status, None)
725 if self.options.faults:
726 raise Exception((status, reason))
727 else:
728 return (status, None)
729
730 def location(self):
731 p = Unskin(self.options)

Callers 1

sendMethod · 0.95

Calls 3

last_receivedMethod · 0.95
tostrMethod · 0.80
get_faultMethod · 0.80

Tested by

no test coverage detected