Merge "Handle deprecation of inspect.getargspec"

This commit is contained in:
Zuul 2017-12-16 04:30:47 +00:00 committed by Gerrit Code Review
commit 964595a20f
1 changed files with 6 additions and 1 deletions

View File

@ -27,6 +27,11 @@ from keystone.i18n import _
LOG = log.getLogger(__name__)
if hasattr(inspect, 'getfullargspec'):
getargspec = inspect.getfullargspec
else:
getargspec = inspect.getargspec
def response_truncated(f):
"""Truncate the list returned by the wrapped function.
@ -86,7 +91,7 @@ class _TraceMeta(type):
@staticmethod
def wrapper(__f, __classname):
__argspec = inspect.getargspec(__f)
__argspec = getargspec(__f)
__fn_info = '%(module)s.%(classname)s.%(funcname)s' % {
'module': inspect.getmodule(__f).__name__,
'classname': __classname,