mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
pySim.esim.saip: maintain a parsed fileystem hierarchy
With this change, the ProfileElementSequence object will maintain a representation of the filesystem hierarchy of the eSIM profile. Every file that is added by a ProfileElement will add a FsNode into that tree, and each FsNode will point to the File object for the respective file. This allows us to find files by their path, as well as add files by path. Change-Id: I2caadc24b1087855f23f3c57cdf8dabbf81757c0
This commit is contained in:
@@ -20,7 +20,7 @@ import sys
|
||||
import argparse
|
||||
import logging
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from pathlib import Path as PlPath
|
||||
from typing import List
|
||||
|
||||
from pySim.esim.saip import *
|
||||
@@ -66,7 +66,7 @@ parser_eapp.add_argument('--format', default='cap', choices=['ijc', 'cap'], help
|
||||
def do_split(pes: ProfileElementSequence, opts):
|
||||
i = 0
|
||||
for pe in pes.pe_list:
|
||||
basename = Path(opts.INPUT_UPP).stem
|
||||
basename = PlPath(opts.INPUT_UPP).stem
|
||||
if not pe.identification:
|
||||
fname = '%s-%02u-%s.der' % (basename, i, pe.type)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user