2
0
Fork 0

create config_dir automatically

This commit is contained in:
Carlos Galindo 2024-05-25 12:19:36 +02:00
parent 7bbafeedeb
commit 4dd422d07c

2
issue_generator.py Executable file → Normal file
View file

@ -174,6 +174,8 @@ class FeedReader:
else: etag = None
feed = feedparser.parse(self.url, etag=etag)
if feed.etag and feed.etag != etag:
if not os.path.isdir(CONFIG_DIR):
os.mkdir(CONFIG_DIR)
with open(self.etag_file, mode='w', encoding="UTF-8") as file:
file.write(feed.etag)
if feed.status == 304: