From bdd6e38d01ee90aa9623ed6f14e684e220e43680 Mon Sep 17 00:00:00 2001 From: Le Bao Hiep Date: Mon, 22 May 2023 12:36:26 +0700 Subject: [PATCH] communication: remove config workaround Ref: https://github.com/VNOI-Admin/judge-server/commit/34634596531592197fd44ed93a3830e089bdcf2b --- dmoj/graders/communication.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dmoj/graders/communication.py b/dmoj/graders/communication.py index a0e4b2596..f6d88a72a 100644 --- a/dmoj/graders/communication.py +++ b/dmoj/graders/communication.py @@ -52,11 +52,9 @@ def __init__(self, judge, problem, language, source): if self.contrib_type not in contrib_modules: raise InternalError('%s is not a valid contrib module' % self.contrib_type) - # We can't use self.handler_data.get('num_processes', 1) here since 0 is a falsy value - if 'num_processes' in self.handler_data and self.handler_data.num_processes < 1: - raise InternalError('num_processes must be positive') - self.num_processes = self.handler_data.get('num_processes', 1) + if self.num_processes < 1: + raise InternalError('num_processes must be positive') self.manager_binary = self._generate_manager_binary()