INNER CODE UNIT · Python
__call__
tpm2-software/tpm2-pkcs11 · tools/tpm2_pkcs11/command.py:71
def __call__(self, cls):
commandlet._commandlets[self._cmd] = cls()
return cls
@staticmethod
def get():
'''Retrieves the list of registered commandlets.'''
return commandlet._commandlets
@staticmethod
def init(description):
opt_parser = argparse.ArgumentParser(description=description)
subparser = opt_parser.add_subparsers(help='commands')
commandlets = commandlet.get()