diff options
| author | Nicolas Vandamme <n.vandamme@firis-system.lu> | 2025-01-08 15:50:00 +0100 |
|---|---|---|
| committer | Nicolas Vandamme <n.vandamme@firis-system.lu> | 2025-01-08 15:50:00 +0100 |
| commit | 4f0f02e9e38183850021f9b9e19caab3c3062233 (patch) | |
| tree | c567bb842801b4a02e5d97f37b9decadd8fa3fe9 /src | |
| parent | 74caf22455dfdb415addb2e79f62e20eba6c1a58 (diff) | |
| download | vyos-1x-4f0f02e9e38183850021f9b9e19caab3c3062233.tar.gz vyos-1x-4f0f02e9e38183850021f9b9e19caab3c3062233.zip | |
op-mode: T5992: show dhcpv6 leases with (mostly) the same fields and order
Diffstat (limited to 'src')
| -rwxr-xr-x | src/op_mode/dhcp.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py index ec0011285..918836a80 100755 --- a/src/op_mode/dhcp.py +++ b/src/op_mode/dhcp.py @@ -114,7 +114,7 @@ def _get_raw_server_leases(family='inet', pool=None, sorted=None, state=[], orig data_lease['mac'] = lease.get('hw-address', '') data_lease['hostname'] = lease.get('hostname', '') # remove trailing dot to ensure consistency for `vyos-hostsd-client` - if data_lease['hostname'][-1] == '.': + if len(data_lease['hostname']) > 0 and data_lease['hostname'][-1] == '.': data_lease['hostname'] = data_lease['hostname'][:-1] if family == 'inet': |
