mirror of
https://github.com/QingdaoU/JudgeServer.git
synced 2024-12-28 21:31:43 +00:00
修复一处逻辑错误
This commit is contained in:
parent
d3dedfbc87
commit
10b229970a
16
compiler.py
16
compiler.py
@ -37,12 +37,12 @@ class Compiler(object):
|
||||
gid=LOW_PRIVILEDGE_GID)
|
||||
|
||||
if result["result"] != _judger.RESULT_SUCCESS:
|
||||
with open(compiler_out) as f:
|
||||
error = f.read().strip()
|
||||
os.remove(compiler_out)
|
||||
if error:
|
||||
raise CompileError(error)
|
||||
raise CompileError("Compiler runtime error, info: %s" % json.dumps(result).decode("utf-8"))
|
||||
|
||||
os.remove(compiler_out)
|
||||
try:
|
||||
with open(compiler_out) as f:
|
||||
error = f.read().strip()
|
||||
os.remove(compiler_out)
|
||||
if error:
|
||||
raise CompileError(error)
|
||||
except Exception:
|
||||
raise CompileError("Compiler runtime error, info: %s" % json.dumps(result).decode("utf-8"))
|
||||
return exe_path
|
||||
|
@ -127,7 +127,7 @@ class JudgeClient(object):
|
||||
run_result["result"] = _judger.RESULT_WRONG_ANSWER
|
||||
elif spj_result == SPJ_ERROR:
|
||||
run_result["result"] = _judger.RESULT_SYSTEM_ERROR
|
||||
run_result["error"] = _judger.RESULT_SPJ_ERROR
|
||||
run_result["error"] = -11
|
||||
else:
|
||||
run_result["output_md5"], is_ac = self._compare_output(test_case_file_id)
|
||||
# -1 == Wrong Answer
|
||||
|
Loading…
Reference in New Issue
Block a user