diff options
author | Jonathan Weth <git@jonathanweth.de> | 2021-06-28 12:57:23 +0200 |
---|---|---|
committer | Jonathan Weth <git@jonathanweth.de> | 2021-06-28 12:57:23 +0200 |
commit | 9c437fabc0bd3d924413f5e3c0b08f365ca64f9d (patch) | |
tree | a5a1fadc5201718b3f204ca7b91db1d7b09aa407 /rwa/support/sessionservice/session.py | |
parent | e67b9b7ef03ad48aad62dd82b48fb7fdfe3949a8 (diff) | |
parent | d8146354959fb352f9709ae0d2a674c361dbec17 (diff) | |
download | RWA.Support.SessionService-9c437fabc0bd3d924413f5e3c0b08f365ca64f9d.tar.gz RWA.Support.SessionService-9c437fabc0bd3d924413f5e3c0b08f365ca64f9d.tar.bz2 RWA.Support.SessionService-9c437fabc0bd3d924413f5e3c0b08f365ca64f9d.zip |
Merge branch 'master' into feature/multiple-hosts
Diffstat (limited to 'rwa/support/sessionservice/session.py')
-rw-r--r-- | rwa/support/sessionservice/session.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rwa/support/sessionservice/session.py b/rwa/support/sessionservice/session.py index 11c418e..0126800 100644 --- a/rwa/support/sessionservice/session.py +++ b/rwa/support/sessionservice/session.py @@ -146,21 +146,21 @@ class Session: self.stop(triggered=True) raise ConnectionError() + if r.status_code != 200: + self.stop(triggered=True) + raise ConnectionError() + logging.info( "The session has been registered in RWA.Support.WebApp " f"with status code {r.status_code} and response {r.content.decode()}." ) - if r.status_code != 200: - self.stop(triggered=True) - raise ConnectionError() - self.meta = r.json() self.session_id = self.meta["session_id"] self.web_url = self.meta["url"] self.api_token = self.meta["token"] else: - logging.info("The session has pretended that he had created a session.") + logging.info("The service has pretended that he had created a session.") self.meta = {} self.session_id = int(random_digits(10)) self.web_url = f"http://example.com:{random_digits(5)}/app/rwasupport/test/" |