checking in what i have

This commit is contained in:
slackish 2016-10-18 16:06:11 -06:00
parent 9b82417229
commit 1bda94c44d
1 changed files with 2 additions and 1 deletions

View File

@ -66,12 +66,13 @@ if __name__ == '__main__':
for categorypath in glob.glob(os.path.join(categorydir, "*", "puzzle.moth")): for categorypath in glob.glob(os.path.join(categorydir, "*", "puzzle.moth")):
points = categorypath.split(os.sep)[-2] # directory before '/puzzle.moth' points = categorypath.split(os.sep)[-2] # directory before '/puzzle.moth'
categorypath = os.path.dirname(categorypath) categorypath = os.path.dirname(categorypath)
print(categorypath)
try: try:
points = int(points) points = int(points)
except: except:
print("Failed to identify points on: %s" % categorypath, file=sys.stderr) print("Failed to identify points on: %s" % categorypath, file=sys.stderr)
continue continue
puzzle = puzzles.Puzzle(open(categorypath), category_seed) puzzle = puzzles.Puzzle(category_seed, categorypath)
puzzles_dict[points] = puzzle puzzles_dict[points] = puzzle
# build mapping, answers, and summary # build mapping, answers, and summary