diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-23 19:02:42 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-23 19:02:42 +0000 |
| commit | 62b75bf7c4259993e493d66d2fdf256d59ed4aa9 (patch) | |
| tree | 4056a57831291193c88419be500b66eaf46bb162 /nova/openstack | |
| parent | 601882a23dd8a6573f0e59bb26e13233e2dce736 (diff) | |
| parent | a7f307bbc2607b7aaa830574010289767f43de4a (diff) | |
| download | nova-62b75bf7c4259993e493d66d2fdf256d59ed4aa9.tar.gz nova-62b75bf7c4259993e493d66d2fdf256d59ed4aa9.tar.xz nova-62b75bf7c4259993e493d66d2fdf256d59ed4aa9.zip | |
Merge "Update jsonutils from openstack-common."
Diffstat (limited to 'nova/openstack')
| -rw-r--r-- | nova/openstack/common/jsonutils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/openstack/common/jsonutils.py b/nova/openstack/common/jsonutils.py index 5f6a7edab..5a90d5c5e 100644 --- a/nova/openstack/common/jsonutils.py +++ b/nova/openstack/common/jsonutils.py @@ -107,9 +107,11 @@ def to_primitive(value, convert_instances=False, level=0): elif hasattr(value, 'iteritems'): return to_primitive(dict(value.iteritems()), convert_instances=convert_instances, - level=level) + 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. |
