From 6e9ba0fce5c23974b8d7e8cbe45855b4f7e509e0 Mon Sep 17 00:00:00 2001 From: Richard Alpe Date: Mon, 11 Sep 2023 15:05:39 +0200 Subject: [PATCH] cli-pretty: use self variables for ipv4 address Cosmetic code cleanup. Signed-off-by: Richard Alpe --- board/netconf/rootfs/lib/infix/cli-pretty | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/board/netconf/rootfs/lib/infix/cli-pretty b/board/netconf/rootfs/lib/infix/cli-pretty index 39274262..9d2f6d70 100755 --- a/board/netconf/rootfs/lib/infix/cli-pretty +++ b/board/netconf/rootfs/lib/infix/cli-pretty @@ -74,12 +74,7 @@ class Iface: def pr_proto_ipv4(self, pipe=''): - addr = self.data.get("ietf-ip:ipv4") - if not addr: - return - - addresses = self.data.get("ietf-ip:ipv4", {}).get("address", []) - for addr in addresses: + for addr in self.ipv4_addr: row = f"{pipe:<{Pad.iface}}" row += f"{'ipv4':<{Pad.proto}}" row += f"{'':<{Pad.state}}{addr['ip']}/{addr['prefix-length']}"