From 2065274bc8e2cfd3fe01412b1ef32ae7d9ce3b5d Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 23 Oct 2016 20:55:35 +0000 Subject: [PATCH] further debugging; now appears to work properly --- tools/devel-server.py | 33 ++++++++++++++++++++------------- tools/moth.py | 13 ++++++++----- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/tools/devel-server.py b/tools/devel-server.py index 770f5f2..fbf9d46 100755 --- a/tools/devel-server.py +++ b/tools/devel-server.py @@ -113,15 +113,22 @@ you are a fool. path = self.path.rstrip('/') parts = path.split("/") title = None + fpath = None + points = None cat = None + puzzle = None try: fpath = os.path.join("puzzles", parts[2]) - cat = moth.Category(path, seed) - puzzle = cat.puzzle(int(parts[3])) + points = int(parts[3]) except: pass + if fpath: + cat = moth.Category(fpath, seed) + if points: + puzzle = cat.puzzle(int(parts[3])) + if not cat: title = "Puzzle Categories" body.write("