openstack subnet create fails when tags is None
In network/v2/_tag.py lines 105 and 110: obj.tags can be None, in which case set(obj.tags) throws a NoneType exception. Change-Id: I1e965ec947844cbf84676fab27a2261fc0c0ea49 Closes-Bug: #1735836
This commit is contained in:
parent
b061b9c34e
commit
dab49df461
@ -102,10 +102,10 @@ def update_tags_for_set(client, obj, parsed_args):
|
|||||||
if parsed_args.no_tag:
|
if parsed_args.no_tag:
|
||||||
tags = set()
|
tags = set()
|
||||||
else:
|
else:
|
||||||
tags = set(obj.tags)
|
tags = set(obj.tags or [])
|
||||||
if parsed_args.tags:
|
if parsed_args.tags:
|
||||||
tags |= set(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))
|
client.set_tags(obj, list(tags))
|
||||||
|
|
||||||
|
|
||||||
|
6
releasenotes/notes/bug-1735836-9be6d777a6e6410b.yaml
Normal file
6
releasenotes/notes/bug-1735836-9be6d777a6e6410b.yaml
Normal 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>`_]
|
Loading…
x
Reference in New Issue
Block a user