mirror of https://github.com/ekimekim/wubloader
parent
8813068c9d
commit
05d5a190fc
@ -0,0 +1,12 @@
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue