Merge "Py3 fix in fake image service"

This commit is contained in:
Zuul 2018-08-16 18:48:22 +00:00 committed by Gerrit Code Review
commit df3dd2b5c7

View File

@ -167,10 +167,10 @@ class _FakeImageService(object):
trusted_certs=None): trusted_certs=None):
self.show(context, image_id) self.show(context, image_id)
if data: if data:
data.write(self._imagedata.get(image_id, '')) data.write(self._imagedata.get(image_id, b''))
elif dst_path: elif dst_path:
with open(dst_path, 'wb') as data: with open(dst_path, 'wb') as data:
data.write(self._imagedata.get(image_id, '')) data.write(self._imagedata.get(image_id, b''))
def show(self, context, image_id, include_locations=False, def show(self, context, image_id, include_locations=False,
show_deleted=True): show_deleted=True):