Skip to content

Commit

Permalink
Fix domjudge pack judge type check
Browse files Browse the repository at this point in the history
This fixes an issue I introduced in 140abb4, where `rime pack`
command for DOMjudge fails for any default diff-based judge.
  • Loading branch information
tossy310 committed Sep 15, 2023
1 parent 704addb commit c0eafe4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rime/plugins/judge_system/domjudge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit c0eafe4

Please sign in to comment.