fix config file format check

This commit is contained in:
dave 2015-12-27 19:25:29 -08:00
parent 6312503e47
commit c4a1ff86c9
1 changed files with 2 additions and 2 deletions

View File

@ -215,9 +215,9 @@ def run_cli():
sys.exit()
with open(options.config, "r") as c:
if options.config[-4:0] == 'json':
if options.config[-5:0] == '.json':
conf = json.load(c)
elif options.config[-4:0] == 'yml':
elif options.config[-4:0] == '.yml':
from yaml import load as yaml_load
conf = yaml_load(c)
else: