Pārlūkot izejas kodu

error handling: remove explicit calls to logout

Signed-off-by: Sumner Evans <sumner@beeper.com>
Sumner Evans 2 gadi atpakaļ
vecāks
revīzija
13a22615da
1 mainītis faili ar 0 papildinājumiem un 4 dzēšanām
  1. 0 4
      mautrix_instagram/user.py

+ 0 - 4
mautrix_instagram/user.py

@@ -345,7 +345,6 @@ class User(DBUser, BaseUser):
                 await req.mark_done()
                 await req.mark_done()
             except IGNotLoggedInError as e:
             except IGNotLoggedInError as e:
                 self.log.exception("User got logged out during backfill loop")
                 self.log.exception("User got logged out during backfill loop")
-                await self.logout(error=e)
                 break
                 break
             except (IGChallengeError, IGConsentRequiredError) as e:
             except (IGChallengeError, IGConsentRequiredError) as e:
                 self.log.exception("User got a challenge during backfill loop")
                 self.log.exception("User got a challenge during backfill loop")
@@ -687,7 +686,6 @@ class User(DBUser, BaseUser):
                 break
                 break
             except IGNotLoggedInError as e:
             except IGNotLoggedInError as e:
                 self.log.exception("Got not logged in error while syncing")
                 self.log.exception("Got not logged in error while syncing")
-                await self.logout(error=e)
                 return
                 return
             except IGRateLimitError as e:
             except IGRateLimitError as e:
                 self.log.error(
                 self.log.error(
@@ -851,7 +849,6 @@ class User(DBUser, BaseUser):
                     # The sync was successful. Exit the loop.
                     # The sync was successful. Exit the loop.
                     return
                     return
                 except IGNotLoggedInError as e:
                 except IGNotLoggedInError as e:
-                    await self.logout(error=e)
                     return
                     return
                 except Exception:
                 except Exception:
                     self.log.exception(
                     self.log.exception(
@@ -900,7 +897,6 @@ class User(DBUser, BaseUser):
                 await asyncio.sleep(60)
                 await asyncio.sleep(60)
             except IGNotLoggedInError as e:
             except IGNotLoggedInError as e:
                 self.log.warning(f"Failed to reconnect to Instagram: {e}, logging out")
                 self.log.warning(f"Failed to reconnect to Instagram: {e}, logging out")
-                await self.logout(error=e)
                 return
                 return
             except (IGChallengeError, IGConsentRequiredError) as e:
             except (IGChallengeError, IGConsentRequiredError) as e:
                 await self._handle_checkpoint(e, on="reconnect")
                 await self._handle_checkpoint(e, on="reconnect")