feat: remove reference to 'whitelist'

The term doesn't even 'make sense' in this context. 'allowed_prefixes' is a much better variable name.
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-13 02:10:49 -05:00
parent ca2de6a4a3
commit f42b293836

View File

@@ -23,11 +23,11 @@ output = []
data = json.load(sys.stdin)
for container in data:
env = []
whitelist = ['CACHE_PATH=', 'DOCKER_', 'DOKKU_', 'DYNO=', 'PATH=', 'PORT=', 'USER=']
allowed_prefixes = ['CACHE_PATH=', 'DOCKER_', 'DOKKU_', 'DYNO=', 'PATH=', 'PORT=', 'USER=']
for e in container['Config']['Env']:
append = False
for w in whitelist:
if e.startswith(w):
for s in allowed_prefixes:
if e.startswith(s):
append = True
break
if append: