This repository has been archived on 2020-05-07. You can view files and clone it, but cannot push or open issues or pull requests.
2020-04-15 10:57:58 +00:00
|
|
|
"""Update config.env filter."""
|
|
|
|
|
|
|
|
|
|
|
|
def filter_update_env(config, env):
|
2020-04-15 11:01:07 +00:00
|
|
|
if config.get("env", False) is False:
|
|
|
|
return config
|
|
|
|
|
2020-04-15 10:57:58 +00:00
|
|
|
for key, val in env:
|
|
|
|
config["env"][key] = val
|
2020-04-15 11:01:07 +00:00
|
|
|
|
2020-04-15 10:57:58 +00:00
|
|
|
return config
|
|
|
|
|
|
|
|
|
|
|
|
class FilterModule(object):
|
|
|
|
def filters(self):
|
|
|
|
return {"update_env": filter_update_env}
|