Skip to content

Commit ace4e08

Browse files
authored
Merge pull request andersinno#25 from suutari-ai/yaml-safe-load
Use yaml.safe_load to read the configuration
2 parents 40eba6f + eda5ba9 commit ace4e08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

database_sanitizer/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def from_file(cls, filename):
4848
instance = cls()
4949

5050
with open(filename, "rb") as file_stream:
51-
config_data = yaml.load(file_stream)
51+
config_data = yaml.safe_load(file_stream)
5252

5353
instance.load(config_data)
5454

database_sanitizer/tests/test_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
@mock.patch.object(config, 'open')
13-
@mock.patch('yaml.load')
13+
@mock.patch('yaml.safe_load')
1414
def test_from_file(mocked_yaml_load, mocked_open):
1515
mocked_yaml_load.return_value = {}
1616

0 commit comments

Comments
 (0)