mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Make json and yaml files conflict instead of override
This commit is contained in:
parent
e9137ac172
commit
71e0d943fc
1 changed files with 3 additions and 3 deletions
|
@ -5,11 +5,11 @@ from bootstrapvz.common.tools import load_data
|
|||
partial_json = glob.glob(os.path.join(os.path.dirname(__file__), '*.yml'))
|
||||
partial_yaml = glob.glob(os.path.join(os.path.dirname(__file__), '*.json'))
|
||||
|
||||
def dictkey(path):
|
||||
return
|
||||
# yaml overrides json
|
||||
partials = {}
|
||||
for path in partial_json + partial_yaml:
|
||||
key = os.path.splitext(os.path.basename(path))[0]
|
||||
if key in partials:
|
||||
msg = 'Error when loading partial manifests: The partial {key} exists twice'.format(key=key)
|
||||
raise Exception(msg)
|
||||
partials[key] = load_data(path)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue