mirror of https://github.com/dirtbags/moth.git
Better handle some MOTH-related errors
This commit is contained in:
parent
ccf9461d28
commit
7701e98a2d
|
@ -31,7 +31,11 @@ class MothValidator:
|
||||||
def validate(self, categorydir, only_errors=False):
|
def validate(self, categorydir, only_errors=False):
|
||||||
"""Run validation checks against a category"""
|
"""Run validation checks against a category"""
|
||||||
LOGGER.debug("Loading category from %s", categorydir)
|
LOGGER.debug("Loading category from %s", categorydir)
|
||||||
|
try:
|
||||||
category = moth.Category(categorydir, 0)
|
category = moth.Category(categorydir, 0)
|
||||||
|
except NotADirectoryError:
|
||||||
|
return
|
||||||
|
|
||||||
LOGGER.debug("Found %d puzzles in %s", len(category.pointvals()), categorydir)
|
LOGGER.debug("Found %d puzzles in %s", len(category.pointvals()), categorydir)
|
||||||
|
|
||||||
self.results["category"][categorydir] = {
|
self.results["category"][categorydir] = {
|
||||||
|
|
Loading…
Reference in New Issue