diff options
Diffstat (limited to 'src/mailman/bin/master.py')
| -rw-r--r-- | src/mailman/bin/master.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py index 5ffe59647..ebf08ba11 100644 --- a/src/mailman/bin/master.py +++ b/src/mailman/bin/master.py @@ -45,6 +45,12 @@ LOCK_LIFETIME = timedelta(days=1, hours=6) SECONDS_IN_A_DAY = 86400 SUBPROC_START_WAIT = timedelta(seconds=20) +# Environment variables to forward into subprocesses. +PRESERVE_ENVS = ( + 'COVERAGE_PROCESS_START', + 'MAILMAN_EXTRA_TESTING_CFG', + ) + class ScriptOptions(Options): @@ -373,11 +379,11 @@ class Loop: var_dir = os.environ.get('MAILMAN_VAR_DIR') if var_dir is not None: env['MAILMAN_VAR_DIR'] = var_dir - # For the testing framework, if this environment variable is set, pass - # it on to the subprocess. - coverage_env = os.environ.get('COVERAGE_PROCESS_START') - if coverage_env is not None: - env['COVERAGE_PROCESS_START'] = coverage_env + # For the testing framework, if these environment variables are set, + # pass them on to the subprocess. + for envvar in PRESERVE_ENVS: + if envvar in os.environ: + env[envvar] = os.environ[envvar] args.append(env) os.execle(*args) # We should never get here. |
