mirror of
https://github.com/beetbox/beets.git
synced 2026-01-07 16:34:45 +01:00
Fix #2826
Test for major Python version and use inspect.getargspec() or inspect.getfullargspec() respectively to silence deprecation warnings in Python 3
This commit is contained in:
parent
ca359d7e0d
commit
3e0b2ad146
1 changed files with 4 additions and 1 deletions
|
|
@ -127,7 +127,10 @@ class BeetsPlugin(object):
|
|||
value after the function returns). Also determines which params may not
|
||||
be sent for backwards-compatibility.
|
||||
"""
|
||||
argspec = inspect.getargspec(func)
|
||||
if six.PY2:
|
||||
argspec = inspect.getargspec(func)
|
||||
else:
|
||||
argspec = inspect.getfullargspec(func)
|
||||
|
||||
@wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue