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

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


laforge has submitted this change. ( 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(-)

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



diff --git a/pySim-shell.py b/pySim-shell.py
index 5f4624c..e596d11 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -81,6 +81,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: 6
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/0637ae6a/attachment.htm>


More information about the gerrit-log mailing list