From 2412878c12986d4d2eff2ebe8909d352c2f39442 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sat, 29 Apr 2023 09:57:48 +0000 Subject: [PATCH] Fix verbose output of list_hardware_components --- .../ros2controlcli/verb/list_hardware_components.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ros2controlcli/ros2controlcli/verb/list_hardware_components.py b/ros2controlcli/ros2controlcli/verb/list_hardware_components.py index 2f94d70969..54dff21bb6 100644 --- a/ros2controlcli/ros2controlcli/verb/list_hardware_components.py +++ b/ros2controlcli/ros2controlcli/verb/list_hardware_components.py @@ -65,17 +65,12 @@ def main(self, *, args): if args.verbose: print("\tstate interfaces") - for state_interface in component.command_interfaces: + for state_interface in component.state_interfaces: if state_interface.is_available: available_str = f"{bcolors.OKBLUE}[available]{bcolors.ENDC}" else: available_str = f"{bcolors.WARNING}[unavailable]{bcolors.ENDC}" - if state_interface.is_claimed: - claimed_str = f"{bcolors.OKBLUE}[claimed]{bcolors.ENDC}" - else: - claimed_str = "[unclaimed]" - - print(f"\t\t{state_interface.name} {available_str} {claimed_str}") + print(f"\t\t{state_interface.name} {available_str}") return 0