diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 1666cfc..df8ef60 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -10,7 +10,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.8, 3.9, 3.10,3.12] + python-version: [3.8, 3.9,3.12] steps: - uses: actions/checkout@v1 diff --git a/libpkpass/commands/command.py b/libpkpass/commands/command.py index c00be19..64c12df 100644 --- a/libpkpass/commands/command.py +++ b/libpkpass/commands/command.py @@ -47,7 +47,9 @@ def __init__(self, cli, iddb=None, pwdb=None): self.iddb = iddb if iddb else IdentityDB() self.pwdbcached = pwdb is not None self.passworddb = pwdb if pwdb else PasswordDB() - cli.register(self, self.name, self.description) + # https://github.com/python/cpython/issues/94331 + if self.name not in [action.choices.keys() for action in cli.parser._actions if action.dest == "subparser_name"][0]: + cli.register(self, self.name, self.description) def register(self, parser): ##################################################################