From 5326450e8e8cf2dc6e597aaaa8a9c808cde531a1 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Fri, 30 Sep 2022 14:23:50 +0400 Subject: [PATCH] Fixed empty saved_session string --- python_aternos/atclient.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python_aternos/atclient.py b/python_aternos/atclient.py index 32b6b53..6bee808 100644 --- a/python_aternos/atclient.py +++ b/python_aternos/atclient.py @@ -189,12 +189,13 @@ class Client: ) if len(saved) > 1: - return cls.from_session( + obj = cls.from_session( session=session, servers=saved[1:] ) + else: + obj = cls.from_session(session) - obj = cls.from_session(session) obj.saved_session = file return obj @@ -281,7 +282,7 @@ class Client: try: os.remove(file) except OSError as err: - logging.warning(f'Unable to remove session file: {err}') + logging.warning(f'Unable to delete session file: {err}') def list_servers(self, cache: bool = True) -> List[AternosServer]: