Skip to content

Commit

Permalink
T6329: firewall: add a patch for op-mode command <show firewall group>
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-fort committed May 10, 2024
1 parent 8fa1cb4 commit 72c95ec
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/op_mode/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,15 @@ def find_references(group_type, group_name):
continue

for idx, member in enumerate(members):
val = member.get('val', 'N/D')
timeout = str(member.get('timeout', 'N/D'))
expires = str(member.get('expires', 'N/D'))
if type(member) == str:
# Only member, and no timeout:
val = member
timeout = "N/D"
expires = "N/D"
else:
val = member.get('val', 'N/D')
timeout = str(member.get('timeout', 'N/D'))
expires = str(member.get('expires', 'N/D'))

if args.detail:
row.append(f'{val} (timeout: {timeout}, expires: {expires})')
Expand Down

0 comments on commit 72c95ec

Please sign in to comment.