summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-07-18 16:47:34 -0400
committerRussell Bryant <rbryant@redhat.com>2012-07-18 16:47:34 -0400
commit9e1bd9d9313a9f324c5b7b02232e8bd2fd12ea8a (patch)
tree23b44b84ecb9ac76b4b24f874677988f52790030 /openstack
parent2d6f84742a3e8ea51ebbfb82cbeacefe97e199d5 (diff)
downloadoslo-9e1bd9d9313a9f324c5b7b02232e8bd2fd12ea8a.tar.gz
oslo-9e1bd9d9313a9f324c5b7b02232e8bd2fd12ea8a.tar.xz
oslo-9e1bd9d9313a9f324c5b7b02232e8bd2fd12ea8a.zip
Add missing convert_instances arg.
When calling jsonutils.to_primitive() recursively, the convert_instances argument should be passed along. This change fixes one place where it was not. Change-Id: I536e1ca05bb4e613fba71298797879587e8b4b00
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/jsonutils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/openstack/common/jsonutils.py b/openstack/common/jsonutils.py
index e8e14c4..f96e727 100644
--- a/openstack/common/jsonutils.py
+++ b/openstack/common/jsonutils.py
@@ -109,7 +109,9 @@ def to_primitive(value, convert_instances=False, level=0):
convert_instances=convert_instances,
level=level + 1)
elif hasattr(value, '__iter__'):
- return to_primitive(list(value), level)
+ return to_primitive(list(value),
+ convert_instances=convert_instances,
+ level=level)
elif convert_instances and hasattr(value, '__dict__'):
# Likely an instance of something. Watch for cycles.
# Ignore class member vars.