Skip to content

Commit

Permalink
Merge pull request #3828 from HollyGurza/T6578
Browse files Browse the repository at this point in the history
T6578: Fix unhandled exception in "show openconnect-server sessions"
  • Loading branch information
c-po authored Jul 19, 2024
2 parents e2b0534 + e858d96 commit 35644bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/op_mode/openconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ def _get_formatted_sessions(data):
ses_list = []
for ses in data:
ses_list.append([
ses["Device"], ses["Username"], ses["IPv4"], ses["Remote IP"],
ses["_RX"], ses["_TX"], ses["State"], ses["_Connected at"]
ses.get("Device", '(none)'), ses.get("Username", '(none)'),
ses.get("IPv4", '(none)'), ses.get("Remote IP", '(none)'),
ses.get("_RX", '(none)'), ses.get("_TX", '(none)'),
ses.get("State", '(none)'), ses.get("_Connected at", '(none)')
])
if len(ses_list) > 0:
output = tabulate(ses_list, headers)
Expand Down

0 comments on commit 35644bc

Please sign in to comment.