laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/33661 )


Change subject: pySim/tlv.py: Don't create an exception from within raise
......................................................................

pySim/tlv.py: Don't create an exception from within raise

An invalid variable used in a raise ValueError() would cause a further
exception, depriving the user of a meaningful error message.

Change-Id: I6eb31b91bd69c311f07ff259a424edc58b57529a
---
M pySim/tlv.py
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/61/33661/1

diff --git a/pySim/tlv.py b/pySim/tlv.py
index 22a14cd..3e245b5 100644
--- a/pySim/tlv.py
+++ b/pySim/tlv.py
@@ -395,7 +395,7 @@
                     res.append(inst)
                 else:
                     raise ValueError('%s: Unknown TLV Class %s in %s; expected 
%s' %
-                                     (self, i[0], decoded, 
self.members_by_name.keys()))
+                                     (self, k, decoded, 
self.members_by_name.keys()))
         self.children = res
         return res


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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6eb31b91bd69c311f07ff259a424edc58b57529a
Gerrit-Change-Number: 33661
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to