From 8404080bc909251d1b58fde547c749dca34fa2db Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 30 Mar 2021 00:46:24 +0200 Subject: [PATCH] Do log out only when logged in --- tinytinypy/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinytinypy/main.py b/tinytinypy/main.py index a2ba8db..c89fcb0 100644 --- a/tinytinypy/main.py +++ b/tinytinypy/main.py @@ -131,7 +131,8 @@ class Connection: return True if ex_type is None else False def close(self): - self.logout() + if self.isLoggedIn(): + self.logout() self.__conn.close() def _get(self, op, sendSid=True, **parameters):