command runner: prefer term allowlist

This commit is contained in:
Dan Bungert 2022-03-24 11:49:59 -06:00
parent 407d87d8bb
commit d4e755c0e9
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class LoggedCommandRunner:
def __init__(self, ident,
*, use_systemd_user: Optional[bool] = None) -> None:
self.ident = ident
self.env_whitelist = [
self.env_allowlist = [
"PATH", "PYTHONPATH",
"PYTHON",
"TARGET_MOUNT_POINT",
@ -58,7 +58,7 @@ class LoggedCommandRunner:
# --pipe also opens a pipe on stdin. This will effectively make the
# child process behave differently if it reads from stdin.
prefix.append("--pipe")
for key in self.env_whitelist:
for key in self.env_allowlist:
with suppress(KeyError):
prefix.extend(("--setenv", f"{key}={os.environ[key]}"))