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/.

dexter gerrit-no-reply at lists.osmocom.org
Mon Mar 22 21:51:19 UTC 2021


dexter has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/59/23459/1

diff --git a/pySim-shell.py b/pySim-shell.py
index 45b4095..2943cd9 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -100,6 +100,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: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210322/3499119e/attachment.htm>


More information about the gerrit-log mailing list