From a732616ebf586b40b7d725c9b4838b3482d99bd3 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 28 Oct 2019 10:40:55 +0100 Subject: [PATCH] Specify yaml loader, to silence warning This avoids the following warning: exitwp.py:27: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. config = yaml.load(file('config.yaml', 'r')) Compare https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation --- exitwp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exitwp.py b/exitwp.py index 17127d3..a1818f3 100755 --- a/exitwp.py +++ b/exitwp.py @@ -24,7 +24,7 @@ ###################################################### # Configration ###################################################### -config = yaml.load(file('config.yaml', 'r')) +config = yaml.load(file('config.yaml', 'r'), Loader=yaml.FullLoader) wp_exports = config['wp_exports'] build_dir = config['build_dir'] download_images = config['download_images']