From 64b7a8c58fea9042e046f92e3abae55e1a9aa58e Mon Sep 17 00:00:00 2001 From: Adrian Turjak Date: Thu, 17 Jan 2019 16:21:13 +1300 Subject: [PATCH] Get rid of iteritems in favor of items Change-Id: I8cb19d301be92b7c6f4a26b4616547221f77caf0 --- adjutant_ui/api/adjutant.py | 12 ++++++------ .../tasks/templates/tasks/_task_detail_notes.html | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/adjutant_ui/api/adjutant.py b/adjutant_ui/api/adjutant.py index f3c4cb8..28f7e65 100644 --- a/adjutant_ui/api/adjutant.py +++ b/adjutant_ui/api/adjutant.py @@ -592,7 +592,7 @@ def quota_sizes_get(request, region=None): resp = _get_quota_information(request, regions=region, include_usage=False) - for size_name, size in six.iteritems(resp['quota_sizes']): + for size_name, size in resp['quota_sizes'].items(): quota_sizes_dict[size_name] = QUOTA_SIZE( id=size_name, name=size_name, @@ -620,10 +620,10 @@ def size_details_get(request, size, region=None): data = resp['quota_sizes'][size] region_data = resp['regions'][0]['current_quota'] - for service, values in six.iteritems(data): + for service, values in data.items(): if service not in resp['regions'][0]['current_usage']: continue - for resource, value in six.iteritems(values): + for resource, value in values.items(): if _is_quota_hidden(service, resource): continue @@ -655,8 +655,8 @@ def quota_details_get(request, region): data = resp['regions'][0]['current_quota'] - for service, values in six.iteritems(data): - for name, value in six.iteritems(values): + for service, values in data.items(): + for name, value in values.items(): if _is_quota_hidden(service, name): continue @@ -669,7 +669,7 @@ def quota_details_get(request, region): percent = '-' size_blob = {} - for size_name, size_data in resp['quota_sizes'].iteritems(): + for size_name, size_data in resp['quota_sizes'].items(): size_blob[size_name] = size_data[service].get(name, '-') if name != 'id': diff --git a/adjutant_ui/content/tasks/templates/tasks/_task_detail_notes.html b/adjutant_ui/content/tasks/templates/tasks/_task_detail_notes.html index 7bff222..43f0ff7 100644 --- a/adjutant_ui/content/tasks/templates/tasks/_task_detail_notes.html +++ b/adjutant_ui/content/tasks/templates/tasks/_task_detail_notes.html @@ -5,7 +5,7 @@

{% trans "Action Notes" %}


- {% for action, notes in task.action_notes.iteritems %} + {% for action, notes in task.action_notes.items %}
{{ action }}
{% for note in notes %}
{{ note }}