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)
| 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) |
no test coverage detected