mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Replace more instances of unsafe calls to yaml.load
This commit is contained in:
parent
7b910c3fde
commit
4d98088cc1
2 changed files with 2 additions and 2 deletions
|
|
@ -74,7 +74,7 @@ def load(s):
|
|||
"""
|
||||
try:
|
||||
out = []
|
||||
for d in yaml.load_all(s):
|
||||
for d in yaml.safe_load_all(s):
|
||||
if not isinstance(d, dict):
|
||||
raise ParseError(
|
||||
u'each entry must be a dictionary; found {}'.format(
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class ConfigCommandTest(unittest.TestCase, TestHelper):
|
|||
|
||||
def _run_with_yaml_output(self, *args):
|
||||
output = self.run_with_output(*args)
|
||||
return yaml.load(output)
|
||||
return yaml.safe_load(output)
|
||||
|
||||
def test_show_user_config(self):
|
||||
output = self._run_with_yaml_output('config', '-c')
|
||||
|
|
|
|||
Loading…
Reference in a new issue