Skip to content
Snippets Groups Projects
Commit a521f432 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Catch malformed XML responses and print them

parent 058a681b
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,13 @@ def request_meetings(secret: Secret, bbb_url: Url, user_config_path: str) -> Xml
click.edit(filename=user_config_path)
exit()
try:
root = ElementTree.XML(r.text)
except xml.etree.ElementTree.ParseError as e:
click.echo("{} The XML returned from {} returned an xml.etree.ElementTree.ParseError. The response text from the Server was:\n{}".format(click.style('Error:', fg='red', bold=True), url, r.text))
print("Exiting...")
exit()
xmldict = XmlDictConfig(root)
if "returncode" in xmldict.keys():
if xmldict['returncode'] == "FAILED":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment