Check that there are some lists enabled

main
Bob Mottram 2021-10-21 15:41:05 +01:00
parent 0c0cbf9485
commit 6a4cb89f58
1 changed files with 2 additions and 0 deletions

View File

@ -879,6 +879,8 @@ def brochModeLapses(baseDir: str, lapseDays: int = 7) -> bool:
def loadCWLists(baseDir: str, verbose: bool, listsEnabled: str) -> {}:
"""Load lists used for content warnings
"""
if not listsEnabled:
return {}
if not os.path.isdir(baseDir + '/cwlists'):
return {}
result = {}