Skip to content

Commit 8fb6497

Browse files
Add Loader=yaml.Loader to yaml.load (ros#178)
1 parent 9cd4f8d commit 8fb6497

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/dynparam

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Examples:
110110
node = args[0]
111111
if len(args) == 2:
112112
node, value = args[0], args[1]
113-
values_dict = yaml.load(value)
113+
values_dict = yaml.load(value, Loader=yaml.Loader)
114114
if type(values_dict) != dict:
115115
parser.error('invalid arguments. Please specify either a node name, parameter name and parameter value, or a node name and a YAML dictionary')
116116
elif len(args) == 3:
@@ -159,7 +159,7 @@ def do_load():
159159
f = open(path, 'r')
160160
try:
161161
params = {}
162-
for doc in yaml.load_all(f.read()):
162+
for doc in yaml.load_all(f.read(), Loader=yaml.Loader):
163163
params.update(doc)
164164
finally:
165165
f.close()

0 commit comments

Comments
 (0)