From ddb758a780c74d95d2c6bfc00d50fc7a04de7d34 Mon Sep 17 00:00:00 2001 From: jwansek Date: Mon, 24 Jan 2022 15:30:01 +0000 Subject: switched to jinja for making test files. made it only test files without errors. --- mark.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mark.py') diff --git a/mark.py b/mark.py index 835ac03..2fe28c5 100644 --- a/mark.py +++ b/mark.py @@ -38,10 +38,11 @@ class FileDependencies: pass for file_dep in stuff_to_remove: - if os.path.isfile(file_dep): - os.remove(file_dep) - else: - shutil.rmtree(file_dep) + if os.path.exists(file_dep): + if os.path.isfile(file_dep): + os.remove(file_dep) + else: + shutil.rmtree(file_dep) def main(**kwargs): student_no = os.path.splitext(os.path.split(args["submission"])[-1])[0] -- cgit v1.2.3