mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-19 08:41:06 -06:00
Fixed some incorrect error handling on utils
This commit is contained in:
parent
33b6000b41
commit
db13c96baa
@ -132,7 +132,7 @@ def if_user_exists(twitter, user):
|
|||||||
data = twitter.get_user(screen_name=user)
|
data = twitter.get_user(screen_name=user)
|
||||||
return data
|
return data
|
||||||
except TweepError as err:
|
except TweepError as err:
|
||||||
if err.error_code == 50:
|
if err.api_code == 50:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return user
|
return user
|
||||||
@ -201,7 +201,7 @@ def filter_tweet(tweet, tweet_data, settings, buffer_name):
|
|||||||
def twitter_error(error):
|
def twitter_error(error):
|
||||||
if error.api_code == 179:
|
if error.api_code == 179:
|
||||||
msg = _(u"Sorry, you are not authorised to see this status.")
|
msg = _(u"Sorry, you are not authorised to see this status.")
|
||||||
elif error.error_code == 144:
|
elif error.api_code == 144:
|
||||||
msg = _(u"No status found with that ID")
|
msg = _(u"No status found with that ID")
|
||||||
else:
|
else:
|
||||||
msg = _(u"Error code {0}").format(error.api_code,)
|
msg = _(u"Error code {0}").format(error.api_code,)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user