mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-25 23:08:34 +03:00
commands.py: Resolve possible variable use before assignment
pySim/commands.py:608:39: E0606: Possibly using variable 'p2' before assignment (possibly-used-before-assignment) Let's raise an exception in the erroneous case. Change-Id: I23adf2e89aa8a13246cc20ef022c84f0113eb2cd
This commit is contained in:
@@ -606,6 +606,8 @@ class SimCardCommands:
|
|||||||
p2 = '81'
|
p2 = '81'
|
||||||
elif context == 'gsm':
|
elif context == 'gsm':
|
||||||
p2 = '80'
|
p2 = '80'
|
||||||
|
else:
|
||||||
|
raise ValueError("Unsupported context '%s'" % context)
|
||||||
(data, sw) = self.send_apdu_constr_checksw(
|
(data, sw) = self.send_apdu_constr_checksw(
|
||||||
self.cla_byte, '88', '00', p2, AuthCmd3G, cmd_data, AuthResp3G)
|
self.cla_byte, '88', '00', p2, AuthCmd3G, cmd_data, AuthResp3G)
|
||||||
if 'auts' in data:
|
if 'auts' in data:
|
||||||
|
|||||||
Reference in New Issue
Block a user