Skip to content

Commit

Permalink
3.11+ parser fix
Browse files Browse the repository at this point in the history
  • Loading branch information
carljbai committed Oct 8, 2024
1 parent fd18f21 commit 73b5749
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libpkpass/commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
##################################################################
Expand Down

0 comments on commit 73b5749

Please sign in to comment.