Change in pysim[master]: pySim-shell: add command to show file description

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/+/23458 )


Change subject: pySim-shell: add command to show file description
......................................................................

pySim-shell: add command to show file description

All all files (CardFile) have a human readable description but there is
no command to display that description yet

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



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/58/23458/1

diff --git a/pySim-shell.py b/pySim-shell.py
index 1bba54f..45b4095 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -83,6 +83,14 @@
 		pin_adm = sanitize_pin_adm(arg)
 		self.card.verify_adm(h2b(pin_adm))
 
+	@cmd2.with_category(CUSTOM_CATEGORY)
+	def do_desc(self, opts):
+		"""Display human readable file description for the currently selected file"""
+		desc = self.rs.selected_file.desc
+		if desc:
+			self.poutput(desc)
+		else:
+			self.poutput("no description available")
 
 
 @with_default_category('ISO7816 Commands')

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If716cf3c6b09d53dca652b588671487d5343cf58
Gerrit-Change-Number: 23458
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/5cbb2d95/attachment.htm>


More information about the gerrit-log mailing list