summaryrefslogtreecommitdiff
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
commit69aebcec456b7ae52a069a972e399b2e7102673c (patch)
tree375796bd7c32ad78f1defb497ba21783f7b0d2c7
parenta91d35a3da1e6c1228cedb7e07f2b3c0798001fc (diff)
downloadoslo-serialization-69aebcec456b7ae52a069a972e399b2e7102673c.tar.gz
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
-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.