summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorYang Youseok <ileixe@gmail.com>2017-12-27 18:34:11 +0900
committerDean Troyer <dtroyer@gmail.com>2018-06-09 13:16:34 -0500
commit71f138b172e95515b9d54eee9b3e318df3381791 (patch)
treea1d90cb619a9fa1a7924314b838a9aca989ea86b /openstackclient
parent8c5f7555698491c3a0b44fe6c3fee50d0189f2d6 (diff)
downloadpython-openstackclient-71f138b172e95515b9d54eee9b3e318df3381791.tar.gz
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
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/identity/v2_0/project.py2
1 files changed, 1 insertions, 1 deletions
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)