Skip to content

Commit

Permalink
fix(user): tolerate more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lmeyerov committed Sep 6, 2022
1 parent cdf05f6 commit 15f1573
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/TwintPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import json
import logging
import time
from twint.token import RefreshTokenException

logger = logging.getLogger()

Expand Down Expand Up @@ -87,6 +88,8 @@ def _get_user_info(self, username, ignore_errors=False):
try:
twint.run.Lookup(self.config)
return twint.storage.panda.User_df
except RefreshTokenException as e:
raise e
except Exception as e:
if ignore_errors:
logger.error('Error getting user info for %s, proceeding because ignore_errors=True', username, exc_info=True)
Expand Down

0 comments on commit 15f1573

Please sign in to comment.