diff --git a/devel/devel-server.py b/devel/devel-server.py index 5762efc..e05bc94 100755 --- a/devel/devel-server.py +++ b/devel/devel-server.py @@ -41,6 +41,8 @@ async def handle_puzzlelist(request): cat = moth.Category(p, seed) puzzles[catName] = [[i, str(i)] for i in cat.pointvals()] puzzles[catName].append([0, ""]) + if len(puzzles) <= 1: + logging.warning("No directories found matching {}/*".format(request.app["puzzles_dir"])) return web.Response( content_type="application/json", body=json.dumps(puzzles), diff --git a/docs/devel-server.md b/docs/devel-server.md index 7058596..bc05d3a 100644 --- a/docs/devel-server.md +++ b/docs/devel-server.md @@ -30,7 +30,7 @@ try this: apt install python3 git clone https://github.com/dirtbags/moth/ cd moth - ./devel-server.py --puzzles example-puzzles + python3 devel/devel-server.py --puzzles example-puzzles Installing New Puzzles