Skip to content

Commit

Permalink
Switch to yaml.safe_load (ros#21069)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoote committed May 2, 2019
1 parent 19f91ba commit 9945813
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/check_rosdep.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def fun(i, l, o):
prev = st[lvl]
try:
# parse as yaml to parse `"foo bar"` as string 'foo bar' not string '"foo bar"'
item = yaml.load(m.groups()[0])
item = yaml.safe_load(m.groups()[0])
except:
print('woops line %d' % i)
raise
Expand All @@ -160,7 +160,7 @@ def my_assert(val):
# here be tests.
ydict = None
try:
ydict = yaml.load(buf)
ydict = yaml.safe_load(buf)
except Exception:
pass
if ydict != {}:
Expand All @@ -176,7 +176,7 @@ def my_assert(val):
else:
print_test("skipping file with empty dict contents...")
try:
ydict = yaml.load(buf)
ydict = yaml.safe_load(buf)

# ensure that values don't contain whitespaces
whitespace_whitelist = ["el capitan", "mountain lion"]
Expand Down

0 comments on commit 9945813

Please sign in to comment.