diff --git a/netplan_cli/cli/commands/status.py b/netplan_cli/cli/commands/status.py index 74cfc1700..4cd564d9a 100644 --- a/netplan_cli/cli/commands/status.py +++ b/netplan_cli/cli/commands/status.py @@ -751,10 +751,14 @@ def _display_missing_interfaces(self): def plain_print(self, *args, **kwargs): if len(args): lst = list(args) - for tag in MATCH_TAGS.findall(lst[0]): - # remove matching opening and closing tag - lst[0] = lst[0].replace('[{}]'.format(tag), '')\ - .replace('[/{}]'.format(tag), '') + while True: + tags = MATCH_TAGS.findall(lst[0]) + if not tags: + break + for tag in tags: + # remove matching opening and closing tag + lst[0] = lst[0].replace('[{}]'.format(tag), '')\ + .replace('[/{}]'.format(tag), '') return print(*lst, **kwargs) return print(*args, **kwargs)