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_
e = i
if m == 0: # No overhead ? use this !
break;
break
# Generate output
out = []
@ -303,7 +303,7 @@ def gen_parameters(opts):
if opts.name is not None:
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:
msisdn = opts.msisdn
@ -320,7 +320,7 @@ def gen_parameters(opts):
if opts.iccid is not None:
iccid = opts.iccid
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:
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 == i:
f.close()
return row;
return row
i += 1
if row['iccid'] == iccid:
f.close()
return row;
return row
if row['imsi'] == imsi:
f.close()
return row;
return row
f.close()
return None

View File

@ -329,7 +329,7 @@ class _MagicSimBase(Card):
r = self._scc.select_file(['3f00', '7f4d', f[0]])
rec_len = int(r[-1][28:30], 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]):
raise RuntimeError('Bad card type')
@ -459,7 +459,7 @@ class FakeMagicSim(Card):
r = self._scc.select_file(['3f00', '000c'])
rec_len = int(r[-1][28:30], 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):
raise RuntimeError('Bad card type')

View File

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

View File

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

View File

@ -117,7 +117,7 @@ class SerialSimLink(LinkBase):
rst_meth = rst_meth_map[self._rst_pin[1:]]
rst_val = rst_val_map[self._rst_pin[0]]
except:
raise ValueError('Invalid reset pin %s' % self._rst_pin);
raise ValueError('Invalid reset pin %s' % self._rst_pin)
rst_meth(rst_val)
time.sleep(0.1) # 100 ms
@ -128,7 +128,7 @@ class SerialSimLink(LinkBase):
if not b:
return 0
if ord(b) != 0x3b:
return -1;
return -1
self._dbg_print("TS: 0x%x Direct convention" % ord(b))
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 ?)
continue
if not b:
break;
break
data += b
# Split datafield from SW