From 71f138b172e95515b9d54eee9b3e318df3381791 Mon Sep 17 00:00:00 2001 From: Yang Youseok Date: Wed, 27 Dec 2017 18:34:11 +0900 Subject: Fix RuntimeError when showing project which has extra properties If you use python3, items() returns iterator which is not allowed to remove item during iteration. Fix to iterate by copied list. Change-Id: I64c037d04e2b127d8f19f56cab65122af89a7200 Closes-Bug: 1740232 --- openstackclient/identity/v2_0/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstackclient') diff --git a/openstackclient/identity/v2_0/project.py b/openstackclient/identity/v2_0/project.py index 04d422ec..9bb5fc4d 100644 --- a/openstackclient/identity/v2_0/project.py +++ b/openstackclient/identity/v2_0/project.py @@ -289,7 +289,7 @@ class ShowProject(command.ShowOne): # the API has and handle the extra top level properties. reserved = ('name', 'id', 'enabled', 'description') properties = {} - for k, v in info.items(): + for k, v in list(info.items()): if k not in reserved: # If a key is not in `reserved` it's a property, pop it info.pop(k) -- cgit v1.2.1