Skip to content

Commit

Permalink
communication: remove config workaround
Browse files Browse the repository at this point in the history
Ref: 3463459
  • Loading branch information
hieplpvip committed May 22, 2023
1 parent fdc4fc3 commit bdd6e38
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dmoj/graders/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit bdd6e38

Please sign in to comment.