Merge "Replace deprecated inspect.getargspec"

This commit is contained in:
Zuul 2023-01-17 13:20:59 +00:00 committed by Gerrit Code Review
commit 0c7d458d63

View File

@ -39,7 +39,8 @@ def handle_errors(error_message, error_default=None, request_arg=None):
def decorator(func):
# XXX This is an ugly hack for finding the 'request' argument.
if request_arg is None:
for _request_arg, name in enumerate(inspect.getargspec(func).args):
for _request_arg, name in enumerate(
inspect.getfullargspec(func).args):
if name == 'request':
break
else: