fix twitter/mastodon interface (really)

This commit is contained in:
b3yond 2017-07-11 22:49:24 +02:00
parent b10090a449
commit a2f7b49c99

View file

@ -127,7 +127,7 @@ class RetweetBot(object):
# these lines.
except twitter.error.TwitterError:
print("[ERROR] probably you already retweeted this tweet.")
return ()
return None
except requests.exceptions.ConnectionError:
print("[ERROR] Bad Connection.")
sleep(10)
@ -165,7 +165,9 @@ class RetweetBot(object):
# Is the Text of the Tweet in the triggerlist?
if self.trigger.is_ok(status.text):
# Retweet status
mastodon.append(self.retweet(status))
toot = self.retweet(status)
if toot:
mastodon.append(toot)
# save the id so it doesn't get crawled again
self.last_mention = status.id