Skip to content

Commit 684d2f6

Browse files
committed
Remove yaml unsafe deprecation warning
hides warning such has below in the projects using config-probe. This will make sure that config-probe uses the safe yaml load version. I don't see a valid reason to have injected code in your configuration ifile. This is a possibly breaking change. YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
1 parent 8772cd1 commit 684d2f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config_probe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def fake_probe(content):
3737

3838

3939
_parsers = {
40-
".yaml": lambda f: yaml.load(f) or {},
40+
".yaml": lambda f: yaml.safe_load(f) or {},
4141
".json": lambda f: json.load(f),
4242
}
4343

0 commit comments

Comments
 (0)