diff --git a/bbbmon/meetings.py b/bbbmon/meetings.py index 5b642d397c9e6f25159652f9fcee9f84f2fa9218..66340b86909074927208ce62ef585a0cbc83ba8b 100644 --- a/bbbmon/meetings.py +++ b/bbbmon/meetings.py @@ -49,7 +49,13 @@ def request_meetings(secret: Secret, bbb_url: Url, user_config_path: str) -> Xml click.edit(filename=user_config_path) exit() - root = ElementTree.XML(r.text) + 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":