From 5ba751d89b3ff98cf2a8163810bc2226e4691a1d Mon Sep 17 00:00:00 2001 From: Davis Goglin Date: Wed, 16 Mar 2016 15:24:08 -0700 Subject: [PATCH] Stop checking for file to be python2/3 compatible --- escpos/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/escpos/config.py b/escpos/config.py index 556887d..def8e68 100644 --- a/escpos/config.py +++ b/escpos/config.py @@ -43,11 +43,11 @@ class Config(object): ) try: - if isinstance(config_path, file): - config = yaml.safe_load(config_path) - else: + if isinstance(config_path, str): with open(config_path, 'rb') as f: config = yaml.safe_load(f) + else: + config = yaml.safe_load(config_path) except EnvironmentError: raise exceptions.ConfigNotFoundError('Couldn\'t read config at {config_path}'.format( config_path=str(config_path),