From baafdd27a2f1e506860e7797bbdd332bfdac5160 Mon Sep 17 00:00:00 2001 From: John Donaldson Date: Tue, 10 Mar 2020 21:29:30 +0000 Subject: [PATCH] Fixing a dynamic grading bug Fixing a script stream bug --- devel/moth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devel/moth.py b/devel/moth.py index 0c8af68..420b272 100644 --- a/devel/moth.py +++ b/devel/moth.py @@ -30,6 +30,7 @@ def djb2hash(str): @contextlib.contextmanager def pushd(newdir): + newdir = str(newdir) curdir = os.getcwd() LOGGER.debug("Attempting to chdir from %s to %s" % (curdir, newdir)) os.chdir(newdir) @@ -265,7 +266,7 @@ class Puzzle: elif key == "scripts" and isinstance(val, list): for script in val: stream = open(script, "rb") - self.add_script_stream(stream, val) + self.add_script_stream(stream, script) elif key == "objective": self.objective = val