Clairify config loading comments

This commit is contained in:
Davis Goglin 2016-03-30 17:13:59 -07:00
parent 062282bf47
commit 8ed1441c4c
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,8 @@ class Config(object):
if hasattr(config_path, 'read'): if hasattr(config_path, 'read'):
config = yaml.safe_load(config_path) config = yaml.safe_load(config_path)
else: else:
# If it isn't, it's a path. We have to open it first. # If it isn't, it's a path. We have to open it first, otherwise
# pyyaml will try to read it as yaml
with open(config_path, 'rb') as config_file: with open(config_path, 'rb') as config_file:
config = yaml.safe_load(config_file) config = yaml.safe_load(config_file)
except EnvironmentError: except EnvironmentError: