From 61ee919a1fbfa1fa1c842bc7cea004b4245d47e1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 2 Dec 2020 13:19:56 +0000 Subject: [PATCH] Avoid empty categories --- utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils.py b/utils.py index 4d2529912..8553a6523 100644 --- a/utils.py +++ b/utils.py @@ -47,6 +47,9 @@ def getHashtagCategories(baseDir: str, category=None) -> None: with open(categoryFilename, 'r') as fp: categoryStr = fp.read() + if not categoryStr: + continue + if category: # only return a dictionary for a specific category if categoryStr != category: