fixed db purge

This commit is contained in:
klemek
2020-05-01 12:48:55 +02:00
parent b2749898a5
commit 28cd3f59d9
+2 -2
View File
@@ -17,8 +17,8 @@ logger = logging.getLogger("meme_db")
def load_memes(purge: bool = False): def load_memes(purge: bool = False):
global DATA, ALIASES global DATA, ALIASES
if purge: if purge:
DATA = {} DATA.clear()
ALIASES = {} ALIASES.clear()
try: try:
with open(DATA_FILE) as input_file: with open(DATA_FILE) as input_file:
content = "".join(input_file.readlines()) content = "".join(input_file.readlines())