Change in pysim[master]: pySim-shell: output currently selected file using select command

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Mar 27 18:20:29 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/23459 )

Change subject: pySim-shell: output currently selected file using select command
......................................................................

pySim-shell: output currently selected file using select command

When the select command is entered with no parameters it fails with an
exception. Lets just output the currently selected file and exit
instead.

Change-Id: I541bd5ed14f240cd1c2bd63647c830f669d26130
Related: OS#4963
---
M pySim-shell.py
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  daniel: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/pySim-shell.py b/pySim-shell.py
index 09749dc..8e222f3 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -90,6 +90,12 @@
 
 	def do_select(self, opts):
 		"""SELECT a File (ADF/DF/EF)"""
+		if len(opts.arg_list) == 0:
+			path_list = self._cmd.rs.selected_file.fully_qualified_path(True)
+			path_list_fid = self._cmd.rs.selected_file.fully_qualified_path(False)
+			self._cmd.poutput("currently selected file: " + '/'.join(path_list) + " (" + '/'.join(path_list_fid) + ")")
+			return
+
 		path = opts.arg_list[0]
 		fcp_dec = self._cmd.rs.select(path, self._cmd)
 		self._cmd.update_prompt()

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23459
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I541bd5ed14f240cd1c2bd63647c830f669d26130
Gerrit-Change-Number: 23459
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210327/fc586729/attachment.htm>


More information about the gerrit-log mailing list