aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-07-01 20:38:53 +0200
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-07-01 20:38:53 +0200
commit88251a0f8c1501ed2211fdc39ee11bc839130f8c (patch)
treedf42ca7a418ff3209de42b839b680b5ada7982e1
parentc9b8dab7aaf902682e268c079531ddbe20aad5b5 (diff)
downloadRWA.Support.SessionService-88251a0f8c1501ed2211fdc39ee11bc839130f8c.tar.gz
RWA.Support.SessionService-88251a0f8c1501ed2211fdc39ee11bc839130f8c.tar.bz2
RWA.Support.SessionService-88251a0f8c1501ed2211fdc39ee11bc839130f8c.zip
Fix KeyError not handled
-rwxr-xr-xrwa/support/sessionservice/service.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rwa/support/sessionservice/service.py b/rwa/support/sessionservice/service.py
index 55ec593..588e531 100755
--- a/rwa/support/sessionservice/service.py
+++ b/rwa/support/sessionservice/service.py
@@ -334,7 +334,7 @@ class RWASupportSessionService(dbus.service.Object):
host_object = self.settings.web_app_hosts[host_id]
host_object = self._build_host_dict(host_id, host_object)
logging.debug('web_app_hosts[%s] is the following host: "%s"', host_id, host_object)
- except IndexError:
+ except (KeyError, IndexError):
logging.error("web_app_hosts[%s] does not exist!", host_id)
response = json.dumps({"status": "error", "type": "host_not_found"})
logging.info("The response to the D-Bus caller: '%s'", response)