Twitter: catch ValueError

This commit is contained in:
Brian S. Stephan 2011-06-27 20:17:30 -05:00
parent 678350fe5d
commit 9abdc98487
1 changed files with 2 additions and 0 deletions

View File

@ -158,6 +158,8 @@ class Twitter(Module):
return self._return_tweet_or_retweet_text(tweet=tweet)
except twitter.TwitterError as e:
return 'Couldn\'t obtain status: ' + str(e)
except ValueError as e:
return 'Couldn\'t obtain status: ' + str(e)
def twitter_tweet(self, connection, event, nick, userhost, what, admin_unlocked):
"""Tweet. Needs authentication."""