summaryrefslogtreecommitdiff
path: root/worker/JOJWorker.py
diff options
context:
space:
mode:
authorBoYanZh <32470225+BoYanZh@users.noreply.github.com>2020-10-04 03:27:30 +0800
committerBoYanZh <32470225+BoYanZh@users.noreply.github.com>2020-10-04 03:27:30 +0800
commitd367046ed14f96e782a053e0eb4be996639897ed (patch)
treeb5c0935c98b94f1a6b39f2d9289cdbe86beb30dd /worker/JOJWorker.py
parentf0d2b5074d7b75c8feb604055b8d0c0c39cedd5f (diff)
update: tidy
Diffstat (limited to 'worker/JOJWorker.py')
-rw-r--r--worker/JOJWorker.py2
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):