mistake in pico-hsm-tool.py #25
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi all,
Very good job ... an HSM module for 4 euros !
Line 114 it should be
parser._init.add_argument('--pin', help='PIN number')
not
parser.add_argument('--pin', help='PIN number')
Line 131 it should be
parser_rtc_get = subparser_rtc.add_parser('get', help='Gets the current datetime.')
not
parser_rtc_get = subparser_rtc.add_parser('set', help='Gets the current datetime.')
bye
parser.add_argument('--pin', help='PIN number')is correct.--pinargument is available not only for initialization, but also for other commands. It is a common parameter for all.Fixed
rtc_get.So in https://github.com/polhenarejos/pico-hsm/blob/master/doc/usage.md
$ python3 pico-hsm-tool.py initialize --so-pin 3537363231383830 --pin 648219
should be
$ python3 pico-hsm-tool.py --pin 648219 initialize --so-pin 3537363231383830
at the end of the command line --pin generates an error
HSM module work like a charm with XCA tool on Windows.
Bye
Hi,
Back again with def parse_args(): in the script
In order to get the --pin args to be place after the command, and to use it with several sub command one can write something like this :
And you have to add the parameter parents=[parent] in each subcommand where the --pin argument can be use.
Bye.