Skip to content

Commit e336e20

Browse files
committed
Added fix for depreciated inspect.getargspec in py3
Should fix #56
1 parent 9d5fc7c commit e336e20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

filebottool/pyfilebot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,11 @@ def get_settings(self):
921921
def _pass_to_function(self, function, *overrided_args, **overrided_kwargs):
922922
"""used set the function arguments to attributes found in this class.
923923
Also allows for argument replacement by the user"""
924-
functon_kwargs = inspect.getargspec(function)[0][len(overrided_args) :]
924+
if six.PY3:
925+
functon_kwargs = inspect.getfullargspec(function)[0][len(overrided_args) :]
926+
else:
927+
functon_kwargs = inspect.getargspec(function)[0][len(overrided_args) :]
928+
925929
handler_vars = self.get_settings()
926930
kwargs_to_pass = {}
927931

0 commit comments

Comments
 (0)