aboutsummaryrefslogtreecommitdiff
path: root/rwa/support/sessionservice/session.py
diff options
context:
space:
mode:
authorJonathan Weth <git@jonathanweth.de>2021-06-28 12:57:23 +0200
committerJonathan Weth <git@jonathanweth.de>2021-06-28 12:57:23 +0200
commit9c437fabc0bd3d924413f5e3c0b08f365ca64f9d (patch)
treea5a1fadc5201718b3f204ca7b91db1d7b09aa407 /rwa/support/sessionservice/session.py
parente67b9b7ef03ad48aad62dd82b48fb7fdfe3949a8 (diff)
parentd8146354959fb352f9709ae0d2a674c361dbec17 (diff)
downloadRWA.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.py10
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/"