# While the images returned by driver.shell.glance.get_images()
# are dicts, the images returned by driver.shell.glanceclient.images.create
# are not dicts. We have to use getattr() instead of [] operator.
if not glance_image or not getattr(glance_image,"id",None):
# While the images returned by driver.shell.glance.get_images()
# are dicts, the images returned by driver.shell.glanceclient.images.create
# are not dicts. We have to use getattr() instead of [] operator.
if not glance_image or not getattr(glance_image,"id",None):