From 28927ba0db2a28420d1ac7d4d71fa2e8bfa54a12 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Thu, 28 Mar 2019 02:00:18 +0100 Subject: [PATCH] use safe_load instead of deprecated load Signed-off-by: Mikael Arguedas --- ros1_bridge/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros1_bridge/__init__.py b/ros1_bridge/__init__.py index e38943d7..68ee91f9 100644 --- a/ros1_bridge/__init__.py +++ b/ros1_bridge/__init__.py @@ -220,7 +220,7 @@ def get_ros2_messages(): continue rule_file = os.path.join(package_path, export.attributes['mapping_rules']) with open(rule_file, 'r') as h: - content = yaml.load(h) + content = yaml.safe_load(h) if not isinstance(content, list): print( "The content of the mapping rules in '%s' is not a list" % rule_file, @@ -273,7 +273,7 @@ def get_ros2_services(): continue rule_file = os.path.join(package_path, export.attributes['mapping_rules']) with open(rule_file, 'r') as h: - content = yaml.load(h) + content = yaml.safe_load(h) if not isinstance(content, list): print( "The content of the mapping rules in '%s' is not a list" % rule_file,