From 7701e98a2da3cb1598ef68d9150856a529feaf8e Mon Sep 17 00:00:00 2001 From: John Donaldson Date: Wed, 17 Jul 2019 23:48:43 +0100 Subject: [PATCH] Better handle some MOTH-related errors --- devel/validate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devel/validate.py b/devel/validate.py index 7ac2f82..60f2288 100644 --- a/devel/validate.py +++ b/devel/validate.py @@ -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] = {