summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-20 20:07:17 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-20 20:07:17 +0200
commitf23b73fdd35551960dc958cd42c953fcf52a0e75 (patch)
tree805d5efa7531357fc47050975dd2aaa2498320e0
parentfa7d691122683f1b4869d56be8cb2d7665814f9d (diff)
downloadvyos-1x-f23b73fdd35551960dc958cd42c953fcf52a0e75.tar.gz
vyos-1x-f23b73fdd35551960dc958cd42c953fcf52a0e75.zip
op-mode: dhcp: T2316: bugfix TypeError
Commit d4b1bc0b ("op-mode: dhcp/dhcpv6: T2268: prettify output for invalid input") uses a different API which caused a TypeError. TypeError: get_leases() missing 1 required positional argument: 'leases'
-rwxr-xr-xsrc/op_mode/show_dhcp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/show_dhcp.py b/src/op_mode/show_dhcp.py
index fd23cd9f1..f9577e57e 100755
--- a/src/op_mode/show_dhcp.py
+++ b/src/op_mode/show_dhcp.py
@@ -240,7 +240,7 @@ if __name__ == '__main__':
stats = []
for p in pools:
size = get_pool_size(conf, p)
- leases = len(get_leases(lease_file, state='active', pool=p))
+ leases = len(get_leases(conf, lease_file, state='active', pool=p))
use_percentage = round(leases / size * 100) if size != 0 else 0