From 1a5fac7da29b94884bd7070b1dc517f163285c06 Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Wed, 31 Aug 2016 10:10:10 +0700 Subject: [PATCH] Replace dict.iteritems() with dict.items() Following Python 3 guide https://wiki.openstack.org/wiki/Python3 Thus, we should replace task.iteritems() with task.items() Change-Id: If617c3a87836930dc78a4ce7dd45a9b7804e0d24 --- glanceclient/v2/shell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py index dfd91fb6..5354db42 100644 --- a/glanceclient/v2/shell.py +++ b/glanceclient/v2/shell.py @@ -988,7 +988,7 @@ def do_task_show(gc, args): """Describe a specific task.""" task = gc.tasks.get(args.id) ignore = ['self', 'schema'] - task = dict([item for item in task.iteritems() if item[0] not in ignore]) + task = dict([item for item in task.items() if item[0] not in ignore]) utils.print_dict(task) @@ -1011,6 +1011,6 @@ def do_task_create(gc, args): task_values = {'type': args.type, 'input': input} task = gc.tasks.create(**task_values) ignore = ['self', 'schema'] - task = dict([item for item in task.iteritems() + task = dict([item for item in task.items() if item[0] not in ignore]) utils.print_dict(task)