From 8ed1441c4c3d50c4d9cbfe9cdf1782487b489515 Mon Sep 17 00:00:00 2001 From: Davis Goglin Date: Wed, 30 Mar 2016 17:13:59 -0700 Subject: [PATCH] Clairify config loading comments --- escpos/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/escpos/config.py b/escpos/config.py index 8d5b915..4a5d077 100644 --- a/escpos/config.py +++ b/escpos/config.py @@ -72,7 +72,8 @@ class Config(object): if hasattr(config_path, 'read'): config = yaml.safe_load(config_path) 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: config = yaml.safe_load(config_file) except EnvironmentError: