diff --git a/msg/tools/uorb_rtps_classifier.py b/msg/tools/uorb_rtps_classifier.py index 6480243c886f..e1d8b57418bb 100644 --- a/msg/tools/uorb_rtps_classifier.py +++ b/msg/tools/uorb_rtps_classifier.py @@ -94,7 +94,7 @@ def parse_yaml_msg_id_file(yaml_file): """ try: with open(yaml_file, 'r') as f: - return yaml.load(f, Loader=yaml.FullLoader) + return yaml.safe_load(f) except OSError as e: if e.errno == errno.ENOENT: raise IOError(errno.ENOENT, os.strerror( diff --git a/msg/tools/uorb_to_ros_rtps_ids.py b/msg/tools/uorb_to_ros_rtps_ids.py index ff5b2a0c642a..b739da79e5dd 100644 --- a/msg/tools/uorb_to_ros_rtps_ids.py +++ b/msg/tools/uorb_to_ros_rtps_ids.py @@ -74,7 +74,7 @@ def load_yaml_file(file): with open(file, 'r') as f: if verbose: print("--\t[Step 1] %s yaml file loaded!" % file) - return yaml.load(f, Loader=yaml.FullLoader) + return yaml.safe_load(f) except OSError as e: if e.errno == errno.ENOENT: raise IOError(errno.ENOENT, os.strerror(errno.ENOENT), file)