fix return in TwAPI.post_ttweet
This commit is contained in:
+1
-1
@@ -267,13 +267,13 @@ class TwAPI:
|
|||||||
except:
|
except:
|
||||||
print('Had trouble posting reply image tweet.')
|
print('Had trouble posting reply image tweet.')
|
||||||
print('successfully posted ttweet!')
|
print('successfully posted ttweet!')
|
||||||
return True
|
|
||||||
except tweepy.Forbidden as e:
|
except tweepy.Forbidden as e:
|
||||||
if 'duplicate content' in e.api_messages[0]:
|
if 'duplicate content' in e.api_messages[0]:
|
||||||
print('Twitter says the TalentTweet is a duplicate; skipping error-free...')
|
print('Twitter says the TalentTweet is a duplicate; skipping error-free...')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
|
return True
|
||||||
|
|
||||||
def post_ttweet_by_id(self, tweet_id, is_catchup=False, dry_run=False):
|
def post_ttweet_by_id(self, tweet_id, is_catchup=False, dry_run=False):
|
||||||
ttweet = asyncio.run(tt.TalentTweet.create_from_id(tweet_id))
|
ttweet = asyncio.run(tt.TalentTweet.create_from_id(tweet_id))
|
||||||
|
|||||||
Reference in New Issue
Block a user