Merge "openstack subnet create fails when tags is None"

This commit is contained in:
Zuul 2017-12-02 01:35:38 +00:00 committed by Gerrit Code Review
commit 5cf1190879
2 changed files with 8 additions and 2 deletions

View File

@ -102,10 +102,10 @@ def update_tags_for_set(client, obj, parsed_args):
if parsed_args.no_tag:
tags = set()
else:
tags = set(obj.tags)
tags = set(obj.tags or [])
if parsed_args.tags:
tags |= set(parsed_args.tags)
if set(obj.tags) != tags:
if set(obj.tags or []) != tags:
client.set_tags(obj, list(tags))

View File

@ -0,0 +1,6 @@
---
fixes:
- |
``openstack subnet create`` failed with a NoneType exception when
there were no tags.
[Bug `1735836 <https://bugs.launchpad.net/python-openstackclient/+bug/1735836>`_]