~aasg/nixexprs

ref: 7e3655c5fa4c880c06007691d709cdbc2c7f5efa nixexprs/pkgs/servers/monitoring/bird-lg/config-loader.py -rw-r--r-- 364 bytes
7e3655c5 — Aluísio Augusto Silva Gonçalves bird-lg: Patch to fix bgpmap generation 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
# Put everything inside a function to avoid polluting the script's
# global namespace.
def _config_loader_main():
    import json
    import os
    for filename in os.environ.get("BIRD_LG_CONFIG_FILES", "").split(os.pathsep):
        with open(filename, "r") as file:
            config = json.load(file)
            globals().update(config)
_config_loader_main()