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.
wubloader/zulip_bots/zulip_bots/config.py

13 lines
181 B
Python

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)