1. sboz
  2. osa


Sergey A. Bozhenkov  committed 9ac9746

Correct fault hadling. The fault message can be empty, which before lead to exceptions during xml construction. Added try/catch to fix it.

  • Participants
  • Parent commits b13ba3e
  • Branches default

Comments (0)

Files changed (1)

File osa/methods.py

View file
                 return None
             elif e.code == 500:
                 #read http error body and make xml from it
-                xml = etree.fromstring(e.fp.read())
+                try:
+                    xml = etree.fromstring(e.fp.read())
+                except Exception:
+                    print(e)
+                    return None
                 body = xml.find(SOAP_BODY)
                 if body is None: