fix many bugs

This commit is contained in:
zema1
2017-10-31 16:33:25 +08:00
parent f0655ee305
commit aa4240790b
12 changed files with 62 additions and 35 deletions

View File

@@ -76,7 +76,7 @@ class TestCaseUploadAPI(CSRFExemptAPIView):
content = zip_file.read(item).replace(b"\r\n", b"\n")
size_cache[item] = len(content)
if item.endswith(".out"):
md5_cache[item] = hashlib.md5(content).hexdigest()
md5_cache[item] = hashlib.md5(content.rstrip()).hexdigest()
f.write(content)
test_case_info = {"spj": spj, "test_cases": {}}