diff options
Diffstat (limited to 'glanceclient/common')
-rw-r--r-- | glanceclient/common/http.py | 6 | ||||
-rw-r--r-- | glanceclient/common/utils.py | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py index 67a8d06..38afd58 100644 --- a/glanceclient/common/http.py +++ b/glanceclient/common/http.py @@ -53,7 +53,7 @@ def encode_headers(headers): names and values """ return dict((encodeutils.safe_encode(h), encodeutils.safe_encode(v)) - for h, v in six.iteritems(headers) if v is not None) + for h, v in headers.items() if v is not None) class _BaseHTTPClient(object): @@ -181,7 +181,7 @@ class HTTPClient(_BaseHTTPClient): headers = copy.deepcopy(headers) headers.update(self.session.headers) - for (key, value) in six.iteritems(headers): + for (key, value) in headers.items(): header = '-H \'%s: %s\'' % utils.safe_header(key, value) curl.append(header) @@ -227,7 +227,7 @@ class HTTPClient(_BaseHTTPClient): headers = copy.deepcopy(kwargs.pop('headers', {})) if self.identity_headers: - for k, v in six.iteritems(self.identity_headers): + for k, v in self.identity_headers.items(): headers.setdefault(k, v) data = self._set_common_request_kwargs(headers, kwargs) diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py index 0221bf4..09c89f0 100644 --- a/glanceclient/common/utils.py +++ b/glanceclient/common/utils.py @@ -122,7 +122,7 @@ def schema_args(schema_getter, omit=None): kwargs)) else: properties = schema.get('properties', {}) - for name, property in six.iteritems(properties): + for name, property in properties.items(): if name in omit: continue param = '--' + name.replace('_', '-') @@ -186,7 +186,7 @@ def print_list(objs, fields, formatters=None, field_settings=None): row = [] for field in fields: if field in field_settings: - for setting, value in six.iteritems(field_settings[field]): + for setting, value in field_settings[field].items(): setting_dict = getattr(pt, setting) setting_dict[field] = value @@ -205,7 +205,7 @@ def print_dict(d, max_column_width=80): pt = prettytable.PrettyTable(['Property', 'Value'], caching=False) pt.align = 'l' pt.max_width = max_column_width - for k, v in six.iteritems(d): + for k, v in d.items(): if isinstance(v, (dict, list)): v = json.dumps(v) pt.add_row([k, v]) @@ -388,7 +388,7 @@ def strip_version(endpoint): def print_image(image_obj, human_readable=False, max_col_width=None): ignore = ['self', 'access', 'file', 'schema'] - image = dict([item for item in six.iteritems(image_obj) + image = dict([item for item in image_obj.items() if item[0] not in ignore]) if human_readable: image['size'] = make_size_human_readable(image['size']) |