mirror of https://github.com/ekimekim/wubloader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
181 B
Python
13 lines
181 B
Python
1 year ago
|
import json
|
||
|
|
||
|
import yaml
|
||
|
|
||
|
def get_config(conf_file):
|
||
|
if conf_file.startswith("{"):
|
||
|
return json.loads(conf_file)
|
||
|
else:
|
||
|
with open(conf_file) as f:
|
||
|
return yaml.safe_load(f)
|
||
|
|
||
|
|