We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c649eb commit 31b8b05Copy full SHA for 31b8b05
1 file changed
virttest/utils_net.py
@@ -4106,7 +4106,8 @@ def get_default_gateway_json(
4106
default_route_list = [
4107
x
4108
for x in default_route_list
4109
- if x["metric"] == min([y["metric"] for y in default_route_list])
+ if x.get("metric")
4110
+ == min([y.get("metric", float("inf")) for y in default_route_list])
4111
]
4112
4113
default_route = default_route_list[0]
0 commit comments