utility.py: Fix getargspec error with python 3.11

This commit is contained in:
tibequadorian 2023-01-24 18:39:49 +01:00 committed by Sebastian Pipping
parent 201e6d2982
commit 1fabfb9edd
1 changed files with 1 additions and 1 deletions

View File

@ -666,7 +666,7 @@ def has_method(module, method_name, no_of_args=0):
Check whether the given function is defined in the module or not.
"""
if hasattr(module, method_name):
if len(inspect.getargspec(getattr(module, method_name)).args) == no_of_args:
if len(inspect.getfullargspec(getattr(module, method_name)).args) == no_of_args:
return True
return False