Use request wrapper for session login

This commit is contained in:
clerie 2022-01-06 23:54:40 +01:00
parent d14fb10ddb
commit 5c565bc62c

View File

@ -58,11 +58,9 @@ class Session:
self._connection.connect()
# Login
self._connection.send(messages.Open(self.username, self.password))
r = self.request(messages.Open(self.username, self.password))
res = self._wait_for_respose()
res.raise_on_error()
r.raise_on_error()
def request(self, request):
"""