Change in pysim[master]: commands: depend on pytlv only when it is actually needed

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
Thu Jul 19 10:03:40 UTC 2018


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/10048


Change subject: commands: depend on pytlv only when it is actually needed
......................................................................

commands: depend on pytlv only when it is actually needed

Some of the USIM-Card programming implementations do not need to look
at card responses, which means they also do not have to parse TLV
data. Lets depend on pytlv only in cases where TLV data has to be
parsed so that useser of cards that do not need at can go without
installing pytlv.

Change-Id: Ida841d74d9581e7f395751b0f74556a06a038de6
---
M pySim/commands.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/10048/1

diff --git a/pySim/commands.py b/pySim/commands.py
index 9e16b0e..73c2247 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -23,7 +23,6 @@
 #
 
 from pySim.utils import rpad, b2h
-from pytlv.TLV import *
 
 class SimCardCommands(object):
 	def __init__(self, transport):
@@ -35,6 +34,7 @@
 	def __get_len_from_tlv(self, fcp):
 		# see also: ETSI TS 102 221, chapter 11.1.1.3.1 Response for MF,
 		# DF or ADF
+                from pytlv.TLV import TLV
 		tlvparser = TLV(['82', '83', '84', 'A5', '8a', '8b', '8c', '80', 'ab', 'c6', '81', '88'])
 
 		# pytlv is case sensitive!

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida841d74d9581e7f395751b0f74556a06a038de6
Gerrit-Change-Number: 10048
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180719/ad3a1f3d/attachment.htm>


More information about the gerrit-log mailing list