Stop on failed login

This commit is contained in:
clerie 2022-01-06 17:59:12 +01:00
parent 9f9df79ab8
commit 496b915c9d

View File

@ -57,10 +57,13 @@ class Session:
self._connection.connect()
# Login
self._connection.send(messages.Open(self.username, self.password))
res = self._wait_for_respose()
res.raise_on_error()
def request(self, request):
"""
Sends a request and waits for response