laforge has uploaded this change for review.

View Change

osmo-smdpp.py: Resolve possible variable use before assignment

osmo-smdpp.py:374:72: E0601: Using variable 'iccid_str' before assignment (used-before-assignment)

Let's raise an exception in the erroneous case.

Change-Id: I01b308226e12f91699b1b5c6bb06f853be47e185
---
M osmo-smdpp.py
1 file changed, 16 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/02/36902/1
diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index 1f4311d..3dc6131 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -368,6 +368,9 @@
pes = saip.ProfileElementSequence.from_der(f.read())
iccid_str = b2h(pes.get_pe_for_type('header').decoded['iccid'])

+ # make pylint happy: E0601: Using variable 'iccid_str' before assignment (used-before-assignment)
+ assert iccid_str
+
# FIXME: we actually want to perform the profile binding herr, and read the profile metadat from the profile

# Put together profileMetadata + _bin

To view, visit change 36902. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I01b308226e12f91699b1b5c6bb06f853be47e185
Gerrit-Change-Number: 36902
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange