From 4fa536a9be39632213f305308f07becfe16d037e Mon Sep 17 00:00:00 2001 From: Ji-Wei Date: Thu, 14 Jul 2016 16:01:46 +0800 Subject: [PATCH] Replace dict.iteritems with six.iteritems Python3 do not use dict.iteritems, which would raise AttributeError: 'dict' object has no attribute 'iteritems' Change-Id: I53eb2f8837699965d786e7903bb4e2837be35b6d Closes-Bug: #1596124 --- swift/proxy/controllers/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/proxy/controllers/base.py b/swift/proxy/controllers/base.py index f9b1175e6d..a1ed9d3136 100644 --- a/swift/proxy/controllers/base.py +++ b/swift/proxy/controllers/base.py @@ -182,7 +182,7 @@ def headers_to_object_info(headers, status_int=HTTP_OK): """ headers, meta, sysmeta = _prep_headers_to_info(headers, 'object') transient_sysmeta = {} - for key, val in headers.iteritems(): + for key, val in six.iteritems(headers): if is_object_transient_sysmeta(key): key = strip_object_transient_sysmeta_prefix(key.lower()) transient_sysmeta[key] = val