From ab62249b08e2ba497b1928eaacad8876437c8610 Mon Sep 17 00:00:00 2001 From: Barry Xu Date: Thu, 9 Nov 2023 09:44:16 +0800 Subject: [PATCH] Output a warning while setting both '-t' and 'v' for info command Signed-off-by: Barry Xu --- ros2bag/ros2bag/verb/info.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ros2bag/ros2bag/verb/info.py b/ros2bag/ros2bag/verb/info.py index d48bd06a9c..160f128c8c 100644 --- a/ros2bag/ros2bag/verb/info.py +++ b/ros2bag/ros2bag/verb/info.py @@ -47,6 +47,9 @@ def _is_service_event_topic(self, topic_name, topic_type) -> bool: return True def main(self, *, args): # noqa: D102 + if args.topic_name and args.verbose: + print("Warning! You have set both the '-t' and '-v' parameters. The '-t' parameter " + 'will be ignored.') if args.verbose: Info().read_metadata_and_output_service_verbose(args.bag_path, args.storage) else: