Remove unnecessary semicolon

Change-Id: I9c5665cd2a45a0d06444349eaaeeb5b83a09ffc1
This commit is contained in:
Daniel Willmann
2020-10-19 10:34:31 +02:00
parent de07b95f84
commit 677d41bb41
5 changed files with 13 additions and 13 deletions

View File

@@ -260,7 +260,7 @@ def _dbi_binary_quote(s):
m = sum_ m = sum_
e = i e = i
if m == 0: # No overhead ? use this ! if m == 0: # No overhead ? use this !
break; break
# Generate output # Generate output
out = [] out = []
@@ -303,7 +303,7 @@ def gen_parameters(opts):
if opts.name is not None: if opts.name is not None:
if len(opts.name) > 16: if len(opts.name) > 16:
raise ValueError('Service Provider Name must max 16 characters!'); raise ValueError('Service Provider Name must max 16 characters!')
if opts.msisdn is not None: if opts.msisdn is not None:
msisdn = opts.msisdn msisdn = opts.msisdn
@@ -320,7 +320,7 @@ def gen_parameters(opts):
if opts.iccid is not None: if opts.iccid is not None:
iccid = opts.iccid iccid = opts.iccid
if not _isnum(iccid, 19) and not _isnum(iccid, 20): if not _isnum(iccid, 19) and not _isnum(iccid, 20):
raise ValueError('ICCID must be 19 or 20 digits !'); raise ValueError('ICCID must be 19 or 20 digits !')
else: else:
if opts.num is None: if opts.num is None:
@@ -492,15 +492,15 @@ def _read_params_csv(opts, iccid=None, imsi=None):
if opts.num is not None and opts.read_iccid is False and opts.read_imsi is False: if opts.num is not None and opts.read_iccid is False and opts.read_imsi is False:
if opts.num == i: if opts.num == i:
f.close() f.close()
return row; return row
i += 1 i += 1
if row['iccid'] == iccid: if row['iccid'] == iccid:
f.close() f.close()
return row; return row
if row['imsi'] == imsi: if row['imsi'] == imsi:
f.close() f.close()
return row; return row
f.close() f.close()
return None return None

View File

@@ -329,7 +329,7 @@ class _MagicSimBase(Card):
r = self._scc.select_file(['3f00', '7f4d', f[0]]) r = self._scc.select_file(['3f00', '7f4d', f[0]])
rec_len = int(r[-1][28:30], 16) rec_len = int(r[-1][28:30], 16)
tlen = int(r[-1][4:8],16) tlen = int(r[-1][4:8],16)
rec_cnt = (tlen / rec_len) - 1; rec_cnt = (tlen / rec_len) - 1
if (rec_cnt < 1) or (rec_len != f[1]): if (rec_cnt < 1) or (rec_len != f[1]):
raise RuntimeError('Bad card type') raise RuntimeError('Bad card type')
@@ -459,7 +459,7 @@ class FakeMagicSim(Card):
r = self._scc.select_file(['3f00', '000c']) r = self._scc.select_file(['3f00', '000c'])
rec_len = int(r[-1][28:30], 16) rec_len = int(r[-1][28:30], 16)
tlen = int(r[-1][4:8],16) tlen = int(r[-1][4:8],16)
rec_cnt = (tlen / rec_len) - 1; rec_cnt = (tlen / rec_len) - 1
if (rec_cnt < 1) or (rec_len != 0x5a): if (rec_cnt < 1) or (rec_len != 0x5a):
raise RuntimeError('Bad card type') raise RuntimeError('Bad card type')

View File

@@ -26,7 +26,7 @@ from pySim.utils import rpad, b2h
class SimCardCommands(object): class SimCardCommands(object):
def __init__(self, transport): def __init__(self, transport):
self._tp = transport; self._tp = transport
self._cla_byte = "a0" self._cla_byte = "a0"
self.sel_ctrl = "0000" self.sel_ctrl = "0000"

View File

@@ -35,7 +35,7 @@ from pySim.utils import h2i, i2h
class PcscSimLink(LinkBase): class PcscSimLink(LinkBase):
def __init__(self, reader_number=0): def __init__(self, reader_number=0):
r = readers(); r = readers()
self._reader = r[reader_number] self._reader = r[reader_number]
self._con = self._reader.createConnection() self._con = self._reader.createConnection()

View File

@@ -117,7 +117,7 @@ class SerialSimLink(LinkBase):
rst_meth = rst_meth_map[self._rst_pin[1:]] rst_meth = rst_meth_map[self._rst_pin[1:]]
rst_val = rst_val_map[self._rst_pin[0]] rst_val = rst_val_map[self._rst_pin[0]]
except: except:
raise ValueError('Invalid reset pin %s' % self._rst_pin); raise ValueError('Invalid reset pin %s' % self._rst_pin)
rst_meth(rst_val) rst_meth(rst_val)
time.sleep(0.1) # 100 ms time.sleep(0.1) # 100 ms
@@ -128,7 +128,7 @@ class SerialSimLink(LinkBase):
if not b: if not b:
return 0 return 0
if ord(b) != 0x3b: if ord(b) != 0x3b:
return -1; return -1
self._dbg_print("TS: 0x%x Direct convention" % ord(b)) self._dbg_print("TS: 0x%x Direct convention" % ord(b))
while ord(b) == 0x3b: while ord(b) == 0x3b:
@@ -222,7 +222,7 @@ class SerialSimLink(LinkBase):
if (to_recv == 2) and (b == '\x60'): # Ignore NIL if we have no RX data (hack ?) if (to_recv == 2) and (b == '\x60'): # Ignore NIL if we have no RX data (hack ?)
continue continue
if not b: if not b:
break; break
data += b data += b
# Split datafield from SW # Split datafield from SW