mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -05:00
swap unsafe yaml.load usage for yaml.safe_load (#2324)
Related to #2323 Recommend additionally adding a step in CI ensuring use of `yaml.load` is prevented from existing in the code base.
This commit is contained in:
@@ -10,7 +10,7 @@ def test_trivia_lists():
|
||||
for l in list_names:
|
||||
with l.open() as f:
|
||||
try:
|
||||
dict_ = yaml.load(f)
|
||||
dict_ = yaml.safe_load(f)
|
||||
except yaml.error.YAMLError as e:
|
||||
problem_lists.append((l.stem, "YAML error:\n{!s}".format(e)))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user