diff --git a/glance/common/utils.py b/glance/common/utils.py index b24abdaf97..3e05a5a24e 100644 --- a/glance/common/utils.py +++ b/glance/common/utils.py @@ -210,9 +210,9 @@ def image_meta_to_http_headers(image_meta): for pk, pv in v.items(): if pv is not None: headers["x-image-meta-property-%s" - % pk.lower()] = unicode(pv) + % pk.lower()] = six.text_type(pv) else: - headers["x-image-meta-%s" % k.lower()] = unicode(v) + headers["x-image-meta-%s" % k.lower()] = six.text_type(v) return headers diff --git a/glance/scrubber.py b/glance/scrubber.py index 95977cfe82..47fa5d286a 100644 --- a/glance/scrubber.py +++ b/glance/scrubber.py @@ -138,7 +138,7 @@ class ScrubFileQueue(ScrubQueue): while True: loc_id = f.readline().strip() if loc_id: - lid = unicode(loc_id) + lid = six.text_type(loc_id) loc_ids.append(int(lid) if lid.isdigit() else lid) uris.append(unicode(f.readline().strip())) delete_times.append(int(f.readline().strip()))