laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37849?usp=email )
Change subject: contrib/saip-tool: Add 'tree' command to display filesystem tree of profile ......................................................................
contrib/saip-tool: Add 'tree' command to display filesystem tree of profile
Change-Id: I5cda7ef814648543c63938ac6a4fb9dba79379ff --- M contrib/saip-tool.py 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/contrib/saip-tool.py b/contrib/saip-tool.py index cdb2a7b..faf6041 100755 --- a/contrib/saip-tool.py +++ b/contrib/saip-tool.py @@ -63,6 +63,8 @@ parser_eapp.add_argument('--output-dir', default='.', help='Output directory (where to store files)') parser_eapp.add_argument('--format', default='cap', choices=['ijc', 'cap'], help='Data format of output files')
+parser_info = subparsers.add_parser('tree', help='Display the filesystem tree') + def do_split(pes: ProfileElementSequence, opts): i = 0 for pe in pes.pe_list: @@ -222,6 +224,8 @@ with io.BytesIO(load_block_obj) as f, zipfile.ZipFile(fname, 'w') as z: javacard.ijc_to_cap(f, z, package_aid)
+def do_tree(pes:ProfileElementSequence, opts): + pes.mf.print_tree()
if __name__ == '__main__': opts = parser.parse_args() @@ -250,3 +254,5 @@ do_info(pes, opts) elif opts.command == 'extract-apps': do_extract_apps(pes, opts) + elif opts.command == 'tree': + do_tree(pes, opts)