baseimage-tutorial-framework/lib/tfw/config/envvars.py
2018-02-09 10:38:16 +01:00

9 lines
300 B
Python

from os import environ
from collections import namedtuple
TFW_PREFIX = 'TFW_'
tfwenvvars = {envvar.replace(TFW_PREFIX, '', 1): environ.get(envvar)
for envvar in environ.keys()
if envvar.startswith(TFW_PREFIX)}
tfwenv = namedtuple('tfwenvtuple', tfwenvvars)(**tfwenvvars)