diff options
Diffstat (limited to 'worker/JOJWorker.py')
-rw-r--r-- | worker/JOJWorker.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/worker/JOJWorker.py b/worker/JOJWorker.py index 1f4fd16..48ea1d2 100644 --- a/worker/JOJWorker.py +++ b/worker/JOJWorker.py @@ -93,11 +93,13 @@ class JOJWorker(): if not os.path.exists(filePath): self.logger.warning(f"{groupName} h{hwNum} {fn} not exist") return 0 + if os.path.exists(filePath + ".zip"): os.remove(filePath + ".zip") with zipfile.ZipFile(filePath + ".zip", mode='w') as zf: zf.write(filePath, fn) res = self.getProblemResult(jojInfo["homeworkID"], problemID, filePath + ".zip", jojInfo["lang"], groupName, fn, hwNum) + os.remove(filePath + ".zip") return res def checkGroupJOJ(self, jojInfo): |