lxcd list error fixed
This commit is contained in:
parent
f987c72c5f
commit
85b070b132
2
lxcd.py
2
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"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue