From 80b80e895c574dcabdfa415c31dac80e6356754d Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 18 Oct 2016 05:20:48 +0000 Subject: [PATCH] Make it work again --- devel-server.py | 4 ++-- puzzles.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/devel-server.py b/devel-server.py index 9ae36ff..9330761 100755 --- a/devel-server.py +++ b/devel-server.py @@ -146,9 +146,9 @@ you are a fool. self.wfile.write(content.encode('utf-8')) -def run(address=('', 8080)): +def run(address=('localhost', 8080)): httpd = ThreadingServer(address, MothHandler) - print("=== Listening on http://{}:{}/".format(address[0] or "localhost", address[1])) + print("=== Listening on http://{}:{}/".format(address[0], address[1])) httpd.serve_forever() if __name__ == '__main__': diff --git a/puzzles.py b/puzzles.py index 634049e..b481592 100644 --- a/puzzles.py +++ b/puzzles.py @@ -86,12 +86,9 @@ class Puzzle: else: raise ValueError("Unacceptable file type for puzzle at {}".format(path)) - self._seed = category_seed * self['points'] + self._seed = category_seed * self.points self.rand = random.Random(self._seed) - # Set our 'files' as a dict, since we want register them uniquely by name. - self['files'] = dict() - # A list of temporary files we've created that will need to be deleted. self._temp_files = []