laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37785?usp=email )
Change subject: runtime: add method to lookup a file by name without selecting it
......................................................................
runtime: add method to lookup a file by name without selecting it
In some cases it might come in handy to be able to lookup a random file
in the file system tree before actually selecting it. This would be
very useful in situations where we need to check the presence of the
file or if we need to check certain file attributes before performing
some task.
Related: OS#6092
Change-Id: I6b6121e749cea843163659e1a26bb3893c032e29
---
M pySim/runtime.py
1 file changed, 36 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/runtime.py b/pySim/runtime.py
index 08371ae..5ffbee6 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -234,6 +234,42 @@
node = node.parent
return None
+ def get_file_by_name(self, name: str) -> CardFile:
+ """Obtain the file object from the file system tree by its name without actually selecting the file.
+
+ Returns:
+ CardFile() instance or None"""
+
+ # handling of entire paths with multiple directories/elements
+ if '/' in name:
+ pathlist = name.split('/')
+ # treat /DF.GSM/foo like MF/DF.GSM/foo
+ if pathlist[0] == '':
+ pathlist[0] = 'MF'
+ else:
+ pathlist = [name]
+
+ # start in the current working directory (we can still
+ # select any ADF and the MF from here, so those will be
+ # among the selectables).
+ file = self.get_cwd()
+
+ for p in pathlist:
+ # Look for the next file in the path list
+ selectables = file.get_selectables().items()
+ file = None
+ for selectable in selectables:
+ if selectable[1].name == name:
+ file = selectable[1]
+ break
+
+ # When we hit none, then the given path must be invalid
+ if file is None:
+ return None
+
+ # Return the file object found at the tip of the path
+ return file
+
def interpret_sw(self, sw: str):
"""Interpret a given status word relative to the currently selected application
or the underlying card profile.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37785?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6b6121e749cea843163659e1a26bb3893c032e29
Gerrit-Change-Number: 37785
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37641?usp=email )
Change subject: pySim-shell: improve export and enable exportation of DF and ADF files
......................................................................
pySim-shell: improve export and enable exportation of DF and ADF files
Since we now have the ability to provide export methods for all file
types in the file system (this also includes DF and ADF files), we need
to support this at shell command level as well. Let's also renovate the
walk method and the action method that does the actual exporting.
Related: OS#6092
Change-Id: I3ee661dbae5c11fec23911775f352ac13bc2c6e5
---
M pySim-shell.py
1 file changed, 39 insertions(+), 56 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index dbd9510..183fbb6 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -54,7 +54,7 @@
from pySim.utils import is_hexstr_or_decimal, is_hexstr, is_decimal
from pySim.card_handler import CardHandler, CardHandlerAuto
-from pySim.filesystem import CardMF, CardDF, CardADF
+from pySim.filesystem import CardMF, CardEF, CardDF, CardADF
from pySim.ts_102_221 import pin_names
from pySim.ts_102_222 import Ts102222Commands
from pySim.gsm_r import DF_EIRENE
@@ -495,12 +495,25 @@
self._cmd.poutput(directory_str)
self._cmd.poutput("%d files" % len(selectables))
- def walk(self, indent=0, action_ef=None, action_df=None, context=None, **kwargs):
+ def __walk_action(self, action, filename, context, **kwargs):
+ # Changing the currently selected file while walking over the filesystem tree would disturb the
+ # walk, so we memorize the currently selected file here so that we can select it again after
+ # we have executed the action callback.
+ selected_file_before_action = self._cmd.lchan.selected_file
+
+ # Perform action
+ action(filename, context, **kwargs)
+
+ # When the action callback is done, make sure the file that was selected before is selected again.
+ if selected_file_before_action != self._cmd.lchan.selected_file:
+ self._cmd.lchan.select_file(selected_file_before_action, self._cmd)
+
+ def __walk(self, indent=0, action_ef=None, action_df=None, context=None, **kwargs):
"""Recursively walk through the file system, starting at the currently selected DF"""
if isinstance(self._cmd.lchan.selected_file, CardDF):
if action_df:
- action_df(context, **kwargs)
+ self.__walk_action(action_df, self._cmd.lchan.selected_file.name, context, **kwargs)
files = self._cmd.lchan.selected_file.get_selectables(
flags=['FNAMES', 'ANAMES'])
@@ -533,66 +546,45 @@
# If the DF was skipped, we never have entered the directory
# below, so we must not move up.
if skip_df == False:
- self.walk(indent + 1, action_ef, action_df, context, **kwargs)
+ self.__walk(indent + 1, action_ef, action_df, context, **kwargs)
self._cmd.lchan.select_file(self._cmd.lchan.selected_file.parent, self._cmd)
elif action_ef:
- df_before_action = self._cmd.lchan.selected_file
- action_ef(f, context, **kwargs)
- # When walking through the file system tree the action must not
- # always restore the currently selected file to the file that
- # was selected before executing the action() callback.
- if df_before_action != self._cmd.lchan.selected_file:
- raise RuntimeError("inconsistent walk, %s is currently selected but expecting %s to be selected"
- % (str(self._cmd.lchan.selected_file), str(df_before_action)))
+ self.__walk_action(action_ef, f, context, **kwargs)
def do_tree(self, opts):
"""Display a filesystem-tree with all selectable files"""
- self.walk()
+ self.__walk()
- def export_ef(self, filename, context, as_json):
- """ Select and export a single elementary file (EF) """
+ def __export_file(self, filename, context, as_json):
+ """ Select and export a single file (EF, DF or ADF) """
context['COUNT'] += 1
- df = self._cmd.lchan.selected_file
- # The currently selected file (not the file we are going to export)
- # must always be an ADF or DF. From this starting point we select
- # the EF we want to export. To maintain consistency we will then
- # select the current DF again (see comment below).
- if not isinstance(df, CardDF):
- raise RuntimeError(
- "currently selected file %s is not a DF or ADF" % str(df))
+ file = self._cmd.lchan.get_file_by_name(filename)
+ if file:
+ self._cmd.poutput(boxed_heading_str(file.fully_qualified_path_str(True)))
+ self._cmd.poutput("# directory: %s (%s)" % (file.fully_qualified_path_str(True),
+ file.fully_qualified_path_str(False)))
+ else:
+ # If this is called from self.__walk(), then it is ensured that the file exists.
+ raise RuntimeError("cannot export, file %s does not exist in the file system tree" % filename)
- df_path_list = df.fully_qualified_path(True)
- df_path = df.fully_qualified_path_str(True)
- df_path_fid = df.fully_qualified_path_str(False)
-
- file_str = df_path + "/" + str(filename)
- self._cmd.poutput(boxed_heading_str(file_str))
-
- self._cmd.poutput("# directory: %s (%s)" % (df_path, df_path_fid))
try:
- fcp_dec = self._cmd.lchan.select(filename, self._cmd)
+ fcp_dec = self._cmd.lchan.select_file(file, self._cmd)
self._cmd.poutput("# file: %s (%s)" %
(self._cmd.lchan.selected_file.name, self._cmd.lchan.selected_file.fid))
- self._cmd.poutput("# structure: %s" % self._cmd.lchan.selected_file_structure())
+ if isinstance(self._cmd.lchan.selected_file, CardEF):
+ self._cmd.poutput("# structure: %s" % str(self._cmd.lchan.selected_file_structure()))
self._cmd.poutput("# RAW FCP Template: %s" % str(self._cmd.lchan.selected_file_fcp_hex))
self._cmd.poutput("# Decoded FCP Template: %s" % str(self._cmd.lchan.selected_file_fcp))
self._cmd.poutput("select " + self._cmd.lchan.selected_file.fully_qualified_path_str())
self._cmd.poutput(self._cmd.lchan.selected_file.export(as_json, self._cmd.lchan))
-
except Exception as e:
- bad_file_str = df_path + "/" + str(filename) + ", " + str(e)
+ bad_file_str = file.fully_qualified_path_str(True) + "/" + str(file.name) + ", " + str(e)
self._cmd.poutput("# bad file: %s" % bad_file_str)
context['ERR'] += 1
context['BAD'].append(bad_file_str)
- # When reading the file is done, make sure the parent file is
- # selected again. This will be the usual case, however we need
- # to check before since we must not select the same DF twice
- if df != self._cmd.lchan.selected_file:
- self._cmd.lchan.select(df.fid or df.aid, self._cmd)
-
self._cmd.poutput("#")
export_parser = argparse.ArgumentParser()
@@ -610,10 +602,10 @@
exception_str_add = ""
if opts.filename:
- self.export_ef(opts.filename, context, **kwargs_export)
+ self.__walk_action(self.__export_file, opts.filename, context, **kwargs_export)
else:
try:
- self.walk(0, self.export_ef, None, context, **kwargs_export)
+ self.__walk(0, self.__export_file, self.__export_file, context, **kwargs_export)
except Exception as e:
print("# Stopping early here due to exception: " + str(e))
print("#")
@@ -641,7 +633,7 @@
raise RuntimeError(
"unable to export %i dedicated files(s)%s" % (context['ERR'], exception_str_add))
- def fsdump_df(self, context, as_json):
+ def fsdump_df(self, filename, context, as_json):
"""Dump information about currently selected [A]DF"""
df = self._cmd.lchan.selected_file
df_path_list = df.fully_qualified_path(True)
@@ -683,8 +675,7 @@
# The currently selected file (not the file we are going to export)
# must always be an ADF or DF. From this starting point we select
- # the EF we want to export. To maintain consistency we will then
- # select the current DF again (see comment below).
+ # the EF we want to export.
if not isinstance(df, CardDF):
raise RuntimeError("currently selected file %s is not a DF or ADF" % str(df))
@@ -769,13 +760,6 @@
context['result']['files'][file_str] = res
- # When reading the file is done, make sure the parent file is
- # selected again. This will be the usual case, however we need
- # to check before since we must not select the same DF twice
- if df != self._cmd.lchan.selected_file:
- self._cmd.lchan.select(df.fid or df.aid, self._cmd)
-
-
fsdump_parser = argparse.ArgumentParser()
fsdump_parser.add_argument(
'--filename', type=str, default=None, help='only export specific (named) file')
@@ -801,12 +785,11 @@
exception_str_add = ""
if opts.filename:
- # export only that one specified file
- self.fsdump_ef(opts.filename, context, **kwargs_export)
+ self.__walk_action(self.fsdump_ef, opts.filename, context, **kwargs_export)
else:
# export an entire subtree
try:
- self.walk(0, self.fsdump_ef, self.fsdump_df, context, **kwargs_export)
+ self.__walk(0, self.fsdump_ef, self.fsdump_df, context, **kwargs_export)
except Exception as e:
print("# Stopping early here due to exception: " + str(e))
print("#")
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37641?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3ee661dbae5c11fec23911775f352ac13bc2c6e5
Gerrit-Change-Number: 37641
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37774?usp=email )
Change subject: runtime: integrate escape route for applications without ADF support
......................................................................
runtime: integrate escape route for applications without ADF support
the select_parent method in RuntimeLchan currently implements a way
to escape from an application that has no filesystem support. However,
this escape route can be integrated directly into the select_file
method. This will give us the benefit that it will work transparently
in all code locations.
(This also means we can get rid of the select_parent method again)
Related: OS#6120
Change-Id: Ie6f37d13af880d24a9c7a8a95cef436b603587c7
---
M pySim-shell.py
M pySim/runtime.py
2 files changed, 19 insertions(+), 31 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim-shell.py b/pySim-shell.py
index 36cb839..dbd9510 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -534,7 +534,7 @@
# below, so we must not move up.
if skip_df == False:
self.walk(indent + 1, action_ef, action_df, context, **kwargs)
- self._cmd.lchan.select_parent(self._cmd)
+ self._cmd.lchan.select_file(self._cmd.lchan.selected_file.parent, self._cmd)
elif action_ef:
df_before_action = self._cmd.lchan.selected_file
diff --git a/pySim/runtime.py b/pySim/runtime.py
index a90128d..08371ae 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -320,6 +320,24 @@
file : CardFile [or derived class] instance
cmd_app : Command Application State (for unregistering old file commands)
"""
+
+ if not isinstance(file, CardADF) and self.selected_adf and self.selected_adf.has_fs == False:
+ # Not every application that may be present on a GlobalPlatform card will support the SELECT
+ # command as we know it from ETSI TS 102 221, section 11.1.1. In fact the only subset of
+ # SELECT we may rely on is the OPEN SELECT command as specified in GlobalPlatform Card
+ # Specification, section 11.9. Unfortunately the OPEN SELECT command only supports the
+ # "select by name" method, which means we can only select an application and not a file.
+ # The consequence of this is that we may get trapped in an application that does not have
+ # ISIM/USIM like file system support and the only way to leave that application is to select
+ # an ISIM/USIM application in order to get the file system access back.
+ #
+ # To automate this escape-route we will first select an arbitrary ADF that has file system support first
+ # and then continue normally.
+ for selectable in self.rs.mf.get_selectables().items():
+ if isinstance(selectable[1], CardADF) and selectable[1].has_fs == True:
+ self.select(selectable[1].name, cmd_app)
+ break
+
# we need to find a path from our self.selected_file to the destination
inter_path = self.selected_file.build_select_path_to(file)
if not inter_path:
@@ -394,36 +412,6 @@
return self.selected_file_fcp
- def select_parent(self, cmd_app=None):
- """Select the parent file of the currently selected file. This method also works in case the currently selected
- file is an ADF without UICC file system support and can be used to exit those ADFs.
- """
- parent = self.selected_file.parent
- df = self.selected_file
- adf = self.selected_adf
- if adf and adf.has_fs == False:
- # Not every application that may be present on a GlobalPlatform card will support the SELECT
- # command as we know it from ETSI TS 102 221, section 11.1.1. In fact the only subset of
- # SELECT we may rely on is the OPEN SELECT command as specified in GlobalPlatform Card
- # Specification, section 11.9. Unfortunately the OPEN SELECT command only supports the
- # "select by name" method, which means we can only select an application and not a file.
- # The consequence of this is that we may get trapped in an application that does not have
- # ISIM/USIM like file system support and the only way to leave that application is to select
- # an ISIM/USIM application in order to get the file system access back.
- #
- # To automate this escape-route while traversing the file system we will check whether
- # the parent file is the MF. When this is the case and the selected ADF has no file system
- # support, we will select an arbitrary ADF that has file system support first and from there
- # we will then select the MF.
- for selectable in parent.get_selectables().items():
- if isinstance(selectable[1], CardADF) and selectable[1].has_fs == True:
- self.select(selectable[1].name, cmd_app)
- break
- self.select_file(parent, cmd_app)
-
- # Select the parent file normally
- self.select_file(parent, cmd_app)
-
def status(self):
"""Request STATUS (current selected file FCP) from card."""
(data, _sw) = self.scc.status()
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37774?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie6f37d13af880d24a9c7a8a95cef436b603587c7
Gerrit-Change-Number: 37774
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37786?usp=email )
Change subject: pySim-shell: improve fsdump
......................................................................
pySim-shell: improve fsdump
In the previous patch we have improved the export command. Since
the implementation of the fsdump command is very similar to the
implementation of the export command we can now apply the same
improvements to the fsdump command as well.
Change-Id: I4d2ef7b383025a5bbf122f18ecd51b7d73aaba14
Related: OS#6092
---
M pySim-shell.py
1 file changed, 63 insertions(+), 101 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index 183fbb6..3a89f2d 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -633,118 +633,80 @@
raise RuntimeError(
"unable to export %i dedicated files(s)%s" % (context['ERR'], exception_str_add))
- def fsdump_df(self, filename, context, as_json):
- """Dump information about currently selected [A]DF"""
- df = self._cmd.lchan.selected_file
- df_path_list = df.fully_qualified_path(True)
- df_path = df.fully_qualified_path_str(True)
-
- res = {
- 'path': df_path_list,
- }
-
- try:
- if not self._cmd.lchan.selected_file_fcp_hex:
- # An application without a real ADF (like ADF.ARA-M) / filesystem
- return
-
- fcp_dec = self._cmd.lchan.selected_file_fcp
- res['fcp_raw'] = str(self._cmd.lchan.selected_file_fcp_hex)
- res['fcp'] = fcp_dec
-
- except SwMatchError as e:
- res['error'] = {
- 'sw_actual': e.sw_actual,
- 'sw_expected': e.sw_expected,
- 'message': e.description,
+ def __dump_file(self, filename, context, as_json):
+ """ Select and dump a single file (EF, DF or ADF) """
+ file = self._cmd.lchan.get_file_by_name(filename)
+ if file:
+ res = {
+ 'path': file.fully_qualified_path(True)
}
- except Exception as e:
- raise(e)
- res['error'] = {
- 'message': str(e)
- }
-
- context['result']['files'][df_path] = res
-
- def fsdump_ef(self, filename, context, as_json):
- """Select and dump a single elementary file (EF) """
- # TODO: this is very similar to export_ef(), but I couldn't really come up with a way to share
- # code between the two. They only hypothetical option could be turn "export" into a mere
- # post-processing / printing function that works on the fsdump-generated dict/json?
- df = self._cmd.lchan.selected_file
-
- # The currently selected file (not the file we are going to export)
- # must always be an ADF or DF. From this starting point we select
- # the EF we want to export.
- if not isinstance(df, CardDF):
- raise RuntimeError("currently selected file %s is not a DF or ADF" % str(df))
-
- df_path_list = df.fully_qualified_path(True)
- df_path = df.fully_qualified_path_str(True)
- df_path_fid = df.fully_qualified_path_str(False)
-
- file_str = df_path + "/" + str(filename)
-
- res = {
- 'path': df_path_list + [str(filename)],
- }
+ else:
+ # If this is called from self.__walk(), then it is ensured that the file exists.
+ raise RuntimeError("cannot dump, file %s does not exist in the file system tree" % filename)
try:
fcp_dec = self._cmd.lchan.select(filename, self._cmd)
+ # File control parameters (common for EF, DF and ADF files)
+ if not self._cmd.lchan.selected_file_fcp_hex:
+ # An application without a real ADF (like ADF.ARA-M) / filesystem
+ return
+
res['fcp_raw'] = str(self._cmd.lchan.selected_file_fcp_hex)
res['fcp'] = fcp_dec
- structure = self._cmd.lchan.selected_file_structure()
- if structure == 'transparent':
- if as_json:
- result = self._cmd.lchan.read_binary_dec()
- body = result[0]
- else:
- result = self._cmd.lchan.read_binary()
- body = str(result[0])
- elif structure == 'cyclic' or structure == 'linear_fixed':
- body = []
- # Use number of records specified in select response
- num_of_rec = self._cmd.lchan.selected_file_num_of_rec()
- if num_of_rec:
- for r in range(1, num_of_rec + 1):
- if as_json:
- result = self._cmd.lchan.read_record_dec(r)
- body.append(result[0])
- else:
- result = self._cmd.lchan.read_record(r)
- body.append(str(result[0]))
-
- # When the select response does not return the number of records, read until we hit the
- # first record that cannot be read.
- else:
- r = 1
- while True:
- try:
+ # File structure and contents (EF only)
+ if isinstance(self._cmd.lchan.selected_file, CardEF):
+ structure = self._cmd.lchan.selected_file_structure()
+ if structure == 'transparent':
+ if as_json:
+ result = self._cmd.lchan.read_binary_dec()
+ body = result[0]
+ else:
+ result = self._cmd.lchan.read_binary()
+ body = str(result[0])
+ elif structure == 'cyclic' or structure == 'linear_fixed':
+ body = []
+ # Use number of records specified in select response
+ num_of_rec = self._cmd.lchan.selected_file_num_of_rec()
+ if num_of_rec:
+ for r in range(1, num_of_rec + 1):
if as_json:
result = self._cmd.lchan.read_record_dec(r)
body.append(result[0])
else:
result = self._cmd.lchan.read_record(r)
body.append(str(result[0]))
- except SwMatchError as e:
- # We are past the last valid record - stop
- if e.sw_actual == "9402":
- break
- # Some other problem occurred
- raise e
- r = r + 1
- elif structure == 'ber_tlv':
- tags = self._cmd.lchan.retrieve_tags()
- body = {}
- for t in tags:
- result = self._cmd.lchan.retrieve_data(t)
- (tag, l, val, remainer) = bertlv_parse_one(h2b(result[0]))
- body[t] = b2h(val)
- else:
- raise RuntimeError('Unsupported structure "%s" of file "%s"' % (structure, filename))
- res['body'] = body
+
+ # When the select response does not return the number of records, read until we hit the
+ # first record that cannot be read.
+ else:
+ r = 1
+ while True:
+ try:
+ if as_json:
+ result = self._cmd.lchan.read_record_dec(r)
+ body.append(result[0])
+ else:
+ result = self._cmd.lchan.read_record(r)
+ body.append(str(result[0]))
+ except SwMatchError as e:
+ # We are past the last valid record - stop
+ if e.sw_actual == "9402":
+ break
+ # Some other problem occurred
+ raise e
+ r = r + 1
+ elif structure == 'ber_tlv':
+ tags = self._cmd.lchan.retrieve_tags()
+ body = {}
+ for t in tags:
+ result = self._cmd.lchan.retrieve_data(t)
+ (tag, l, val, remainer) = bertlv_parse_one(h2b(result[0]))
+ body[t] = b2h(val)
+ else:
+ raise RuntimeError('Unsupported structure "%s" of file "%s"' % (structure, filename))
+ res['body'] = body
except SwMatchError as e:
res['error'] = {
@@ -758,7 +720,7 @@
'message': str(e)
}
- context['result']['files'][file_str] = res
+ context['result']['files'][file.fully_qualified_path_str(True)] = res
fsdump_parser = argparse.ArgumentParser()
fsdump_parser.add_argument(
@@ -785,11 +747,11 @@
exception_str_add = ""
if opts.filename:
- self.__walk_action(self.fsdump_ef, opts.filename, context, **kwargs_export)
+ self.__walk_action(self.__dump_file, opts.filename, context, **kwargs_export)
else:
# export an entire subtree
try:
- self.__walk(0, self.fsdump_ef, self.fsdump_df, context, **kwargs_export)
+ self.__walk(0, self.__dump_file, self.__dump_file, context, **kwargs_export)
except Exception as e:
print("# Stopping early here due to exception: " + str(e))
print("#")
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37786?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4d2ef7b383025a5bbf122f18ecd51b7d73aaba14
Gerrit-Change-Number: 37786
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>