From c0eafe4e27561538ca6a63ffa65181b4162f0cee Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Fri, 15 Sep 2023 22:29:36 +0900 Subject: [PATCH] Fix domjudge pack judge type check This fixes an issue I introduced in 140abb4, where `rime pack` command for DOMjudge fails for any default diff-based judge. --- rime/plugins/judge_system/domjudge.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rime/plugins/judge_system/domjudge.py b/rime/plugins/judge_system/domjudge.py index e7fe4dd..1e7fbe8 100755 --- a/rime/plugins/judge_system/domjudge.py +++ b/rime/plugins/judge_system/domjudge.py @@ -6,6 +6,7 @@ import time import requests +from rime.basic import codes as basic_codes from rime.basic import consts from rime.core import targets from rime.core import taskgraph @@ -121,7 +122,8 @@ def Pack(self, ui, testset): ui.errors.Error( testset, 'Multiple varidators is not supported in DOMJudge.') yield False - elif len(testset.judges) == 1: + elif (len(testset.judges) == 1 and + not isinstance(testset.judges[0], basic_codes.InternalDiffCode)): judge = testset.judges[0] if not isinstance(judge.variant, DOMJudgeJudgeRunner):