1. George Sakkis
  2. suds

Commits

George Sakkis  committed c108b64

Don't break if error.fp is None

  • Participants
  • Parent commits a32486c
  • Branches default

Comments (0)

Files changed (1)

File suds/client.py

View file
  • Ignore whitespace
         @type error: L{transport.TransportError}
         """
         status, reason = (error.httpcode, tostr(error))
-        reply = error.fp.read()
-        log.debug('http failed:\n%s', reply)
+        reply = error.fp and error.fp.read() or ''
+        log.debug('http failed:\n%s', reply or reason)
         if status == 500:
             if len(reply) > 0:
                 r, p = binding.get_fault(reply)