mirror of https://gerrit.osmocom.org/pysim
shell: Proper argparser (for help + manual) activate_file
Change-Id: I5929ae3deff4d15b5db4a1d866576271c57a955f
This commit is contained in:
parent
2bb17f3df9
commit
799c354827
|
@ -143,7 +143,12 @@ Deactivate the currently selected file. This used to be called INVALIDATE in TS
|
|||
|
||||
activate_file
|
||||
~~~~~~~~~~~~~
|
||||
Activate the currently selected file. This used to be called REHABILITATE in TS 11.11.
|
||||
Activate the specified file. This used to be called REHABILITATE in TS 11.11.
|
||||
You need to specify the name or FID of the file to activate.
|
||||
|
||||
.. argparse::
|
||||
:module: pySim-shell
|
||||
:func: Iso7816Commands.activate_file_parser
|
||||
|
||||
open_channel
|
||||
~~~~~~~~~~~~
|
||||
|
|
|
@ -805,13 +805,15 @@ class Iso7816Commands(CommandSet):
|
|||
self._cmd.poutput("CHV enable successful")
|
||||
|
||||
def do_deactivate_file(self, opts):
|
||||
"""Deactivate the current EF"""
|
||||
"""Deactivate the currently selected EF"""
|
||||
(data, sw) = self._cmd.card._scc.deactivate_file()
|
||||
|
||||
activate_file_parser = argparse.ArgumentParser()
|
||||
activate_file_parser.add_argument('NAME', type=str, help='File name or FID of file to activate')
|
||||
@cmd2.with_argparser(activate_file_parser)
|
||||
def do_activate_file(self, opts):
|
||||
"""Activate the specified EF"""
|
||||
path = opts.arg_list[0]
|
||||
(data, sw) = self._cmd.rs.activate_file(path)
|
||||
(data, sw) = self._cmd.rs.activate_file(opts.NAME)
|
||||
|
||||
def complete_activate_file(self, text, line, begidx, endidx) -> List[str]:
|
||||
"""Command Line tab completion for ACTIVATE FILE"""
|
||||
|
|
Loading…
Reference in New Issue