Skip to content

Commit

Permalink
Added fix for depreciated inspect.getargspec in py3
Browse files Browse the repository at this point in the history
Should fix #56
  • Loading branch information
Laharah committed Nov 8, 2023
1 parent 9d5fc7c commit e336e20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion filebottool/pyfilebot.py
Expand Up @@ -921,7 +921,11 @@ def get_settings(self):
def _pass_to_function(self, function, *overrided_args, **overrided_kwargs):
"""used set the function arguments to attributes found in this class.
Also allows for argument replacement by the user"""
functon_kwargs = inspect.getargspec(function)[0][len(overrided_args) :]
if six.PY3:
functon_kwargs = inspect.getfullargspec(function)[0][len(overrided_args) :]
else:
functon_kwargs = inspect.getargspec(function)[0][len(overrided_args) :]

handler_vars = self.get_settings()
kwargs_to_pass = {}

Expand Down

0 comments on commit e336e20

Please sign in to comment.