From 6d578d5203157f6c3bf3403d4b74c65cc1e66ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Wed, 18 Nov 2015 09:26:07 -0600 Subject: [PATCH] Fixed a bug with twishort in the longtweets handler --- src/long_tweets/twishort.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/long_tweets/twishort.py b/src/long_tweets/twishort.py index d26dc394..ea147903 100644 --- a/src/long_tweets/twishort.py +++ b/src/long_tweets/twishort.py @@ -21,7 +21,10 @@ import keys from twitter import utils def get_twishort_uri(url): - return url.split("twishort.com/")[1] + try: + return url.split("twishort.com/")[1] + except IndexError: + return False def is_long(tweet): long = False