From e6f6a61d8da252c8c13da09ddf092c5c23ac61c7 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Sat, 2 Mar 2013 10:19:40 -0500 Subject: Don't LOG.error on max_depth (by default). Reverts part of 7b206ad which added an extra LOG.error statement when max_depth is hit. This is causing spurious errors to get logged when making some Nova requests. Fixes LP Bug #1140133 Change-Id: I0fff47d9c53c63345ae273a4d20a2bacb27f12e5 --- nova/openstack/common/jsonutils.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'nova/openstack') diff --git a/nova/openstack/common/jsonutils.py b/nova/openstack/common/jsonutils.py index b06055117..3a2f27730 100644 --- a/nova/openstack/common/jsonutils.py +++ b/nova/openstack/common/jsonutils.py @@ -38,14 +38,10 @@ import functools import inspect import itertools import json -import logging import xmlrpclib -from nova.openstack.common.gettextutils import _ from nova.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, -- cgit