From 509ca3ed36b4ef512a47ff8d39c9df751084015a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89douard=20Thuleau?= Date: Wed, 4 Dec 2019 08:21:50 +0100 Subject: Fix router create/show if extraroute not supported If neutron does not support extraroute l3 extension, the route column formatter fails. Change-Id: I7b89c4f818865073947e0850e86c18d0d2415a51 --- openstackclient/network/v2/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstackclient/network') diff --git a/openstackclient/network/v2/router.py b/openstackclient/network/v2/router.py index 02da50c3..5d85e485 100644 --- a/openstackclient/network/v2/router.py +++ b/openstackclient/network/v2/router.py @@ -49,7 +49,7 @@ class RouterInfoColumn(cliff_columns.FormattableColumn): class RoutesColumn(cliff_columns.FormattableColumn): def human_readable(self): # Map the route keys to match --route option. - for route in self._value: + for route in self._value or []: if 'nexthop' in route: route['gateway'] = route.pop('nexthop') return utils.format_list_of_dicts(self._value) -- cgit v1.2.1