<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/23458">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pySim-shell: add command to show file description<br><br>All all files (CardFile) have a human readable description but there is<br>no command to display that description yet<br><br>Change-Id: If716cf3c6b09d53dca652b588671487d5343cf58<br>Related: OS#4963<br>---<br>M pySim-shell.py<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/58/23458/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim-shell.py b/pySim-shell.py</span><br><span>index 1bba54f..45b4095 100755</span><br><span>--- a/pySim-shell.py</span><br><span>+++ b/pySim-shell.py</span><br><span>@@ -83,6 +83,14 @@</span><br><span>             pin_adm = sanitize_pin_adm(arg)</span><br><span>              self.card.verify_adm(h2b(pin_adm))</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+        @cmd2.with_category(CUSTOM_CATEGORY)</span><br><span style="color: hsl(120, 100%, 40%);">+  def do_desc(self, opts):</span><br><span style="color: hsl(120, 100%, 40%);">+              """Display human readable file description for the currently selected file"""</span><br><span style="color: hsl(120, 100%, 40%);">+           desc = self.rs.selected_file.desc</span><br><span style="color: hsl(120, 100%, 40%);">+             if desc:</span><br><span style="color: hsl(120, 100%, 40%);">+                      self.poutput(desc)</span><br><span style="color: hsl(120, 100%, 40%);">+            else:</span><br><span style="color: hsl(120, 100%, 40%);">+                 self.poutput("no description available")</span><br><span> </span><br><span> </span><br><span> @with_default_category('ISO7816 Commands')</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23458">change 23458</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/23458"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If716cf3c6b09d53dca652b588671487d5343cf58 </div>
<div style="display:none"> Gerrit-Change-Number: 23458 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>