diff --git a/lxcd.py b/lxcd.py index b970254..59837e0 100755 --- a/lxcd.py +++ b/lxcd.py @@ -108,7 +108,7 @@ def handle_list(args): ipv4 = "N/A" state = c.get("state") if state: - networks = state.get("network", {}) + networks = state.get("network") or {} eth0 = networks.get("eth0", {}) addrs = [a["address"] for a in eth0.get("addresses", []) if a.get("family") == "inet"]