summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorÉdouard Thuleau <ethuleau@juniper.net>2019-12-04 08:21:50 +0100
committerÉdouard Thuleau <ethuleau@juniper.net>2019-12-04 14:57:20 +0100
commit509ca3ed36b4ef512a47ff8d39c9df751084015a (patch)
tree6a34e2282e08e373bbcb74466225e847ca21d3ec /openstackclient/network
parent5b3a827a1ff80e4b51c7ede44b84bf640d5b6380 (diff)
downloadpython-openstackclient-509ca3ed36b4ef512a47ff8d39c9df751084015a.tar.gz
Fix router create/show if extraroute not supported
If neutron does not support extraroute l3 extension, the route column formatter fails. Change-Id: I7b89c4f818865073947e0850e86c18d0d2415a51
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/v2/router.py2
1 files changed, 1 insertions, 1 deletions
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)