Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmajosi committed Oct 17, 2021
1 parent 4d12742 commit 5330f82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bots/reddit/actions/post_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ def crosspost(self, subreddit):
if subs[0] == subreddit:
return random.choice(subs[idx])


# why do my eyes hurt
def repost(self, roll=1, subreddit=None):
if chance(roll):
log.info("running repost")
# log.info("running _repost")
post = self.get_post(subreddit=subreddit)
if not post: return
api_call=requests.get(post.url).status_code
if api_call != 200:
if api_call == 429:
Expand Down

0 comments on commit 5330f82

Please sign in to comment.