From f91770f9cdc2439edb9445df78be0cebd017b88d Mon Sep 17 00:00:00 2001 From: TSC21 Date: Mon, 14 Oct 2019 21:09:12 +0100 Subject: [PATCH] generate_microRTPS_bridge: fix fastrtpsgen version check handler --- msg/tools/generate_microRTPS_bridge.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msg/tools/generate_microRTPS_bridge.py b/msg/tools/generate_microRTPS_bridge.py index 32da06e759e0..48cd6e56e69b 100644 --- a/msg/tools/generate_microRTPS_bridge.py +++ b/msg/tools/generate_microRTPS_bridge.py @@ -251,9 +251,10 @@ def check_rtps_id_uniqueness(classifier): except OSError: raise - if fastrtpsgen_version_out.isdigit(): + try: fastrtpsgen_version = float(fastrtpsgen_version_out) - else: + except ValueError: + print("'fastrtpsgen -version' returned None. Hardsetting version to 1.0") fastrtpsgen_version = 1.0 else: raise Exception(