Fixing a dynamic grading bug

Fixing a script stream bug
This commit is contained in:
John Donaldson 2020-03-10 21:29:30 +00:00
parent cfa8111dd8
commit baafdd27a2
1 changed files with 2 additions and 1 deletions

View File

@ -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