Skip to content

Commit

Permalink
make use of keyword arguments to eliminate a risk of wrong order of a…
Browse files Browse the repository at this point in the history
…rguments passed in anyconfig.multi_load
  • Loading branch information
ssato committed Apr 23, 2015
1 parent da1ec16 commit feec5bc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions anyconfig/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,16 @@ def multi_load(paths, forced_type=None, ignore_missing=False,
config = container.create(ac_context) if ac_context else container()
for path in paths:
if marker in path: # Nested patterns like ['*.yml', '/a/b/c.yml'].
conf_updates = multi_load(path, forced_type, ignore_missing,
merge, marker, ac_template, config,
**kwargs)
conf_updates = multi_load(path, forced_type=forced_type,
ignore_missing=ignore_missing,
merge=merge, marker=marker,
ac_template=ac_template,
ac_context=config, **kwargs)
else:
conf_updates = single_load(path, forced_type, ignore_missing,
ac_template, config, **kwargs)
conf_updates = single_load(path, forced_type=forced_type,
ignore_missing=ignore_missing,
ac_template=ac_template,
ac_context=config, **kwargs)

config.update(conf_updates, merge)

Expand Down

0 comments on commit feec5bc

Please sign in to comment.