Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit b450133

Browse files
committed
use PyYAML's SafeLoader explicitly
background: https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation suppresses these warnings: ``` /Users/ryan/color/color/local/virtualenv3/src/clrypt/clrypt/encdir.py:34: 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 6f72a08 commit b450133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clrypt/encdir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def read_file(self, group, name, ext='yaml'):
3131
def read_yaml_file(self, group, name, ext='yaml'):
3232
"""Read the named file as decrypted YAML."""
3333
import yaml
34-
return yaml.load(self.read_file(group, name, ext=ext))
34+
return yaml.safe_load(self.read_file(group, name, ext=ext))
3535

3636
def write_file(self, in_fp, group, name, ext='yaml'):
3737
"""Encrypt and write the contents of a file-like object to the named file."""

0 commit comments

Comments
 (0)