From 5dc676bea721e29c449b30a67c3718c8efc08373 Mon Sep 17 00:00:00 2001 From: Davis Goglin Date: Tue, 15 Mar 2016 14:01:21 -0700 Subject: [PATCH] Convert to safe load. Also now allows loading everyting pyyaml supports --- escpos/config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/escpos/config.py b/escpos/config.py index cbeaea0..f8d0ea5 100644 --- a/escpos/config.py +++ b/escpos/config.py @@ -27,8 +27,7 @@ class Config(object): ) try: - with open(config_path) as f: - config = yaml.load(f) + config = yaml.safe_load(f) except EnvironmentError as e: raise exceptions.ConfigNotFoundError('Couldn\'t read config at one or more of {config_path}'.format( config_path="\n".join(config_path),