From 4064582583093b0380425af0d82eb89a180307ff Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 13 Jan 2021 08:47:13 -0600 Subject: [PATCH] Remove old reference to Twython error handling --- src/sessions/twitter/session.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sessions/twitter/session.py b/src/sessions/twitter/session.py index 9e106405..00dcbeae 100644 --- a/src/sessions/twitter/session.py +++ b/src/sessions/twitter/session.py @@ -209,14 +209,14 @@ class Session(base.baseSession): try: val = getattr(self.twitter, call_name)(*args, **kwargs) finished = True - except TwythonError as e: - output.speak(e.msg) + except TweepError as e: + output.speak(e.reason) val = None if e.error_code != 403 and e.error_code != 404: tries = tries+1 time.sleep(5) - elif report_failure and hasattr(e, 'message'): - output.speak(_("%s failed. Reason: %s") % (action, e.msg)) + elif report_failure and hasattr(e, 'reason'): + output.speak(_("%s failed. Reason: %s") % (action, e.reason)) finished = True # except: # tries = tries + 1