Skip to content

Commit

Permalink
Merge pull request #3442 from nicolas-fort/T6329
Browse files Browse the repository at this point in the history
T6329: firewall: add a patch for op-mode command <show firewall group>
  • Loading branch information
c-po authored May 12, 2024
2 parents ef8ec78 + b705adc commit 4fc9d38
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 isinstance(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 4fc9d38

Please sign in to comment.