From e336e20197856c3b647b794d810f6ca96fd9a844 Mon Sep 17 00:00:00 2001 From: laharah Date: Wed, 8 Nov 2023 15:14:00 -0800 Subject: [PATCH] Added fix for depreciated `inspect.getargspec` in py3 Should fix #56 --- filebottool/pyfilebot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/filebottool/pyfilebot.py b/filebottool/pyfilebot.py index b885e1f..5cb0f8e 100644 --- a/filebottool/pyfilebot.py +++ b/filebottool/pyfilebot.py @@ -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 = {}