This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/20761 )
Change subject: Remove unnecessary semicolon
......................................................................
Remove unnecessary semicolon
Change-Id: I9c5665cd2a45a0d06444349eaaeeb5b83a09ffc1
---
M pySim-prog.py
M pySim/cards.py
M pySim/commands.py
M pySim/transport/pcsc.py
M pySim/transport/serial.py
5 files changed, 13 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/61/20761/1
diff --git a/pySim-prog.py b/pySim-prog.py
index 0f752fb..f2d3676 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -260,7 +260,7 @@
m = sum_
e = i
if m == 0: # No overhead ? use this !
- break;
+ break
# Generate output
out = []
@@ -303,7 +303,7 @@
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 @@
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 @@
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
diff --git a/pySim/cards.py b/pySim/cards.py
index a67540f..e949fff 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -329,7 +329,7 @@
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 @@
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')
diff --git a/pySim/commands.py b/pySim/commands.py
index c260a97..7b8ebec 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -26,7 +26,7 @@
class SimCardCommands(object):
def __init__(self, transport):
- self._tp = transport;
+ self._tp = transport
self._cla_byte = "a0"
self.sel_ctrl = "0000"
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py
index 380c8fd..4775a1b 100644
--- a/pySim/transport/pcsc.py
+++ b/pySim/transport/pcsc.py
@@ -35,7 +35,7 @@
class PcscSimLink(LinkBase):
def __init__(self, reader_number=0):
- r = readers();
+ r = readers()
self._reader = r[reader_number]
self._con = self._reader.createConnection()
diff --git a/pySim/transport/serial.py b/pySim/transport/serial.py
index 11fcd6a..61195e0 100644
--- a/pySim/transport/serial.py
+++ b/pySim/transport/serial.py
@@ -117,7 +117,7 @@
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 @@
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 @@
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
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/20761
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9c5665cd2a45a0d06444349eaaeeb5b83a09ffc1
Gerrit-Change-Number: 20761
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201019/b09d25f9/attachment.htm>