From 118c293108f9522a3a84563aa7c8b2a3dce0c1bc Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Fri, 9 Oct 2020 17:29:12 +0200 Subject: [PATCH] Fix response dict access --- bigbluebutton/api/bigbluebutton.py | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bigbluebutton/api/bigbluebutton.py b/bigbluebutton/api/bigbluebutton.py index 0ea46ab..8cc73e0 100644 --- a/bigbluebutton/api/bigbluebutton.py +++ b/bigbluebutton/api/bigbluebutton.py @@ -147,9 +147,9 @@ class BigBlueButton: except Exception as ex: raise BigBlueButtonError("Failed to parse XML response from backend.") from ex - if xml.get("returncode", "FAILED").upper() == "FAILED": - message_key = xml.get("messageKey", "") - message = xml.get("message", "Unknown error") + if xml["response"].get("returncode", "FAILED").upper() == "FAILED": + message_key = xml["response"].get("messageKey", "") + message = xml["response"].get("message", "Unknown error") ex = BigBlueButtonError(f"Backend returned FAILED response: {message}") ex.message_key = message_key diff --git a/pyproject.toml b/pyproject.toml index 3c79c37..ca999f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bigbluebutton2" -version = "0.1a5" +version = "0.1a6" description = "Sophisticated Python client library for BigBlueButtonâ„¢ with Django integration" authors = ["Dominik George <dominik.george@teckids.org>", "Tom Teichler <tom.teichler@teckids.org"] license = "MIT" -- GitLab