diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-03-08 19:01:33 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-03-08 19:03:22 +0100 |
commit | ed620ef7e8ba741e165698c558b110a31cc35dfd (patch) | |
tree | e00a740b16a3aa48726143e991f30e7048c889c4 /op-mode-definitions | |
parent | a6700c7d3b75854c3b213b65951a51464cd073be (diff) | |
download | vyos-1x-ed620ef7e8ba741e165698c558b110a31cc35dfd.tar.gz vyos-1x-ed620ef7e8ba741e165698c558b110a31cc35dfd.zip |
T1277: [dhcp-server] bugfix 'show dhcp server leases'
The script did not check if the service was actually configured or not.
This caused a FileNotFoundError for unconfigured services.
vyos@vyos:~$ show dhcp server leases
Traceback (most recent call last):
File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 123, in <module>
leases = get_leases(lease_file, state='active')
File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 60, in get_leases
leases = IscDhcpLeases(lease_file).get()
File "/usr/lib/python3/dist-packages/isc_dhcp_leases/iscdhcpleases.py", line 110, in get
with open(self.filename) as lease_file:
FileNotFoundError: [Errno 2] No such file or directory: '/config/dhcpd.leases'
Diffstat (limited to 'op-mode-definitions')
0 files changed, 0 insertions, 0 deletions