diff --git a/dhcp-lease-list.py b/dhcp-lease-list.py index fbd9394..c8e24b2 100644 --- a/dhcp-lease-list.py +++ b/dhcp-lease-list.py @@ -239,12 +239,15 @@ def select_active_leases(leases_db, as_of_ts): ############################################################################## -myfile = open('/var/lib/dhcp/dhcpd.leases', 'r') +myfile = open('/var/lib/dhcpd/dhcpd.leases', 'r') leases = parse_leases_file(myfile) myfile.close() now = timestamp_now() report_dataset = select_active_leases(leases, now) +# TODO: UnboundLocalError: +# local variable 'lease_rec' referenced before assignment + print('+---------------------------------------------------------------------') print('| DHCPD ACTIVE LEASES REPORT')