Skip to content

Commit

Permalink
fix: Add missing save_posted check for saving posted articles
Browse files Browse the repository at this point in the history
  • Loading branch information
Epicfisher committed Jun 7, 2022
1 parent 88c96ff commit 5504f9f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ def LoadConfigVariable(system_variable, header, key, mandatory, default_value=-1

print("{0} new articles were posted. Now waiting {1} seconds...".format(newArticles, interval))

with open('postedarticles.txt', 'w') as f:
for article_id in postedArticles:
f.write(article_id + "\n")
if save_posted:
with open('postedarticles.txt', 'w') as f:
for article_id in postedArticles:
f.write(article_id + "\n")

time.sleep(interval - ((time.time() - starttime) % interval))

0 comments on commit 5504f9f

Please sign in to comment.