openstack-python-openstackc.../openstackclient
Mike Fedosin ed1b59848f Check that Glance returns image data before processing it
Now if Glance v2 cannot find image data it returns an empty
response with 204 status code, instead of raising an error.

Glance client handles this situation and wraps the response
with a RequestIdProxy object, whose 'wrapped' attribute is
None.

But when openstack client tries to parse this object using
glanceclient's save_image util function, it fails with
"NoneType object is not iterable" message, for the
object doesn't contain any data.

This patch adds additional check to prevent such behaviour
and raises SystemExit exception if no data was returned from
the server.

Glance v1 is not affected, because it raises an error if can't
find an image data.

Change-Id: I016a60462ba586f9fa7585c2cfafffd7be38de7b
Closes-Bug: #1741223
2018-01-05 19:36:49 +01:00
..
api Remove a bunch of things we promised to remove in 2H 2017 2017-11-30 15:35:42 -06:00
common Remove a bunch of things we promised to remove in 2H 2017 2017-11-30 15:35:42 -06:00
compute flavor: clarify --swap description 2017-12-28 14:56:13 +08:00
identity Merge "Add support for endpoing filter commands" 2017-12-13 02:18:43 +00:00
image Check that Glance returns image data before processing it 2018-01-05 19:36:49 +01:00
locale/tr_TR/LC_MESSAGES Imported Translations from Zanata 2017-08-16 07:50:55 +00:00
network Merge "Allow port list to shown undefined attributes" 2017-12-31 13:00:26 +00:00
object Allow objects to be streamed to stdout 2017-07-05 20:08:18 -03:00
tests Check that Glance returns image data before processing it 2018-01-05 19:36:49 +01:00
volume Replace "Display Name" by "Name" in volume list 2017-05-26 11:37:09 +08:00
__init__.py Change version reporting to use pbr 2013-08-02 12:11:49 -05:00
i18n.py Remove log translations 2017-03-21 17:23:09 +08:00
shell.py Useless line of code in shell.py 2017-09-08 06:28:15 +00:00