mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +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:
|
try:
|
||||||
out = []
|
out = []
|
||||||
for d in yaml.load_all(s):
|
for d in yaml.safe_load_all(s):
|
||||||
if not isinstance(d, dict):
|
if not isinstance(d, dict):
|
||||||
raise ParseError(
|
raise ParseError(
|
||||||
u'each entry must be a dictionary; found {}'.format(
|
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):
|
def _run_with_yaml_output(self, *args):
|
||||||
output = self.run_with_output(*args)
|
output = self.run_with_output(*args)
|
||||||
return yaml.load(output)
|
return yaml.safe_load(output)
|
||||||
|
|
||||||
def test_show_user_config(self):
|
def test_show_user_config(self):
|
||||||
output = self._run_with_yaml_output('config', '-c')
|
output = self._run_with_yaml_output('config', '-c')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue