Better handle some MOTH-related errors

This commit is contained in:
John Donaldson 2019-07-17 23:48:43 +01:00 committed by Donaldson
parent ccf9461d28
commit 7701e98a2d
1 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,11 @@ class MothValidator:
def validate(self, categorydir, only_errors=False):
"""Run validation checks against a category"""
LOGGER.debug("Loading category from %s", categorydir)
category = moth.Category(categorydir, 0)
try:
category = moth.Category(categorydir, 0)
except NotADirectoryError:
return
LOGGER.debug("Found %d puzzles in %s", len(category.pointvals()), categorydir)
self.results["category"][categorydir] = {