summaryrefslogtreecommitdiffstats
path: root/mark.py
diff options
context:
space:
mode:
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]