summaryrefslogtreecommitdiffstats
path: root/mark.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-01-24 15:30:01 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2022-01-24 15:30:01 +0000
commitddb758a780c74d95d2c6bfc00d50fc7a04de7d34 (patch)
treea54a0f0218ce287257ee6db7c2d8642ef150932d /mark.py
parent3313a936debe04c733b3003858724de17cfcd7de (diff)
downloadSmarker-ddb758a780c74d95d2c6bfc00d50fc7a04de7d34.tar.gz
Smarker-ddb758a780c74d95d2c6bfc00d50fc7a04de7d34.zip
switched to jinja for making test files. made it only test files without errors.
Diffstat (limited to 'mark.py')
-rw-r--r--mark.py9
1 files changed, 5 insertions, 4 deletions
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]