summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-09-13 16:13:38 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2024-09-13 16:13:38 +0300
commitec8ceb934c9486bedc56a2682830f0d2164b7f24 (patch)
treee2c243151875e8937c15e266261ba52fa5df85e4
parenteb9e562c28d2935a3823a5522983697cf76dad52 (diff)
downloadvyos-1x-ec8ceb934c9486bedc56a2682830f0d2164b7f24.tar.gz
vyos-1x-ec8ceb934c9486bedc56a2682830f0d2164b7f24.zip
op-mode: T6626: Fix for show dhcpv6 server leases
-rwxr-xr-xsrc/op_mode/dhcp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py
index dffd99de5..5a1351431 100755
--- a/src/op_mode/dhcp.py
+++ b/src/op_mode/dhcp.py
@@ -170,9 +170,9 @@ def _get_formatted_server_leases(raw_data, family='inet'):
ipaddr = lease.get('ip')
state = lease.get('state')
start = lease.get('last_communication')
- start = _utc_to_local(start).strftime('%Y/%m/%d %H:%M:%S')
+ start = _utc_to_local(start).strftime('%Y/%m/%d %H:%M:%S')
end = lease.get('end')
- end = _utc_to_local(end).strftime('%Y/%m/%d %H:%M:%S')
+ end = _utc_to_local(end).strftime('%Y/%m/%d %H:%M:%S') if end else '-'
remain = lease.get('remaining')
lease_type = lease.get('type')
pool = lease.get('pool')