diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2022-12-29 14:16:33 +0100 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2022-12-29 21:30:17 +0800 |
commit | c66ca93b2e9d8db82d196f144ba60482fb92d716 (patch) | |
tree | 15274f2df997583a267d26f34c19537972456cc7 /acprep | |
parent | 0eac2c42804f12eef5c0804e8e0df24aea2121e1 (diff) | |
download | fork-ledger-c66ca93b2e9d8db82d196f144ba60482fb92d716.tar.gz fork-ledger-c66ca93b2e9d8db82d196f144ba60482fb92d716.tar.bz2 fork-ledger-c66ca93b2e9d8db82d196f144ba60482fb92d716.zip |
Add compatability for Python 3.10 and later to acprep
Fixes #2154
Diffstat (limited to 'acprep')
-rwxr-xr-x | acprep | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -193,7 +193,10 @@ class CommandLineApp(object): # not let us differentiate between application errors and a case # where the user has not passed us enough arguments. So, we check # the argument count ourself. - argspec = inspect.getargspec(self.main) + if sys.version_info < (3, 10): + argspec = inspect.getargspec(self.main) + else: + argspec = inspect.getfullargspec(self.main) expected_arg_count = len(argspec[0]) - 1 if len(main_args) >= expected_arg_count: |