summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2013-03-02 10:11:30 -0500
committerDan Prince <dprince@redhat.com>2013-03-02 10:11:30 -0500
commit8071f5636c081c2adb960f838695b0c1380c662f (patch)
treeda4d2be2827e1d6876f1027cdacc8c18690ec9be
parentccb665e6e18a5eba7cf6152f9f5aba6b004476f1 (diff)
downloadoslo-serialization-8071f5636c081c2adb960f838695b0c1380c662f.tar.gz
Don't LOG.error on max_depth (by default).
Reverts part of a94b9b4 which added an extra LOG.error statement when max_depth is hit. This is causing spurious errors to get logged in some of our projects which have adopted this changed. Related to: https://bugs.launchpad.net/nova/+bug/1140133 Change-Id: Ie7939e41797da000dd8b269f905f351df0b7116d
-rw-r--r--openstack/common/jsonutils.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/openstack/common/jsonutils.py b/openstack/common/jsonutils.py
index 1ea7755..04ffba0 100644
--- a/openstack/common/jsonutils.py
+++ b/openstack/common/jsonutils.py
@@ -38,14 +38,10 @@ import functools
import inspect
import itertools
import json
-import logging
import xmlrpclib
-from openstack.common.gettextutils import _
from openstack.common import timeutils
-LOG = logging.getLogger(__name__)
-
def to_primitive(value, convert_instances=False, convert_datetime=True,
level=0, max_depth=3):
@@ -85,8 +81,6 @@ def to_primitive(value, convert_instances=False, convert_datetime=True,
return 'mock'
if level > max_depth:
- LOG.error(_('Max serialization depth exceeded on object: %d %s'),
- level, value)
return '?'
# The try block may not be necessary after the class check above,