kas: support .yaml extension
.yaml is the recommended extension (https://yaml.org/faq.html) Signed-off-by: Chris Laplante <mostthingsweb@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
6b025e4910
commit
7068767d27
@ -58,7 +58,7 @@ def load_config(filename):
|
|||||||
import json
|
import json
|
||||||
with open(filename, 'rb') as fds:
|
with open(filename, 'rb') as fds:
|
||||||
config = json.load(fds)
|
config = json.load(fds)
|
||||||
elif ext == '.yml':
|
elif ext in ['.yml', '.yaml']:
|
||||||
import yaml
|
import yaml
|
||||||
with open(filename, 'rb') as fds:
|
with open(filename, 'rb') as fds:
|
||||||
config = yaml.safe_load(fds)
|
config = yaml.safe_load(fds)
|
||||||
|
Loading…
Reference in New Issue
Block a user