Changed the call to inspect.getargspec() to call inspect.signature() because the getargspec() function was removed from the inspect module.

This commit is contained in:
Andrey Henneberg 2023-06-11 02:38:42 +07:00
parent fce1bb95e7
commit e065b6d78d

4
bottle_sqlite.py Executable file → Normal file
View File

@ -111,8 +111,8 @@ class SQLitePlugin(object):
# Test if the original callback accepts a 'db' keyword. # Test if the original callback accepts a 'db' keyword.
# Ignore it if it does not need a database handle. # Ignore it if it does not need a database handle.
argspec = inspect.getargspec(_callback) signature = inspect.signature(_callback)
if keyword not in argspec.args: if keyword not in signature.parameters:
return callback return callback
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):