Skip to content

Commit

Permalink
Make GCC and VC preserve environment; #243
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Dec 3, 2017
1 parent 89b7ad8 commit d572416
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dmoj/executors/VC.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ def get_compile_env(self):
return VC_COMPILE

def get_env(self):
return VC_ENV
env = super(Executor, self).get_env()
env.update(VC_ENV)
return env
6 changes: 3 additions & 3 deletions dmoj/executors/gcc_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import re
from collections import deque

import six

from dmoj.judgeenv import env
from dmoj.result import Result
from dmoj.utils.unicode import utf8bytes, utf8text
Expand Down Expand Up @@ -77,7 +75,9 @@ def get_security(self, launch_kwargs=None):
)

def get_env(self):
return GCC_ENV
env = super(GCCExecutor, self).get_env()
env.update(GCC_ENV)
return env

def get_feedback(self, stderr, result, process):
if not result.result_flag & Result.RTE or not stderr or len(stderr) > 2048:
Expand Down

0 comments on commit d572416

Please sign in to comment.