summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2020-01-28 17:21:28 +0530
committerankitjavalkar2020-01-28 17:21:28 +0530
commitab221a11559269a396ca9fad92b1e122210e73b5 (patch)
tree3684776b578d9fbe20e46474aae492a42315b980
parent7edfc63ab89d65337e17e8a79e8114a74b2146e3 (diff)
downloadonline_test-ab221a11559269a396ca9fad92b1e122210e73b5.tar.gz
online_test-ab221a11559269a396ca9fad92b1e122210e73b5.tar.bz2
online_test-ab221a11559269a396ca9fad92b1e122210e73b5.zip
Check if file exists before tearing down in JavaStdIOEvaluator
-rw-r--r--yaksh/java_stdio_evaluator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/java_stdio_evaluator.py b/yaksh/java_stdio_evaluator.py
index 89f9fc4..0d7e480 100644
--- a/yaksh/java_stdio_evaluator.py
+++ b/yaksh/java_stdio_evaluator.py
@@ -26,7 +26,8 @@ class JavaStdIOEvaluator(StdIOEvaluator):
self.weight = test_case_data.get('weight')
def teardown(self):
- os.remove(self.submit_code_path)
+ if os.path.exists(self.submit_code_path):
+ os.remove(self.submit_code_path)
if self.files:
delete_files(self.files)