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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user