mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
python3 conversion: fix tabs and spaces inconsistency
Without that fix we have:
$ python3 pySim-read.py
File "pySim-read.py", line 135
try:
^
TabError: inconsistent use of tabs and spaces in indentation
The following command was used to do the conversion:
sed 's# #\t#g' -i $(find -name "*.py")
Then the remaining spaces spotted during the review were
addressed manually.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Change-Id: I83f76a8e9b6e36098f16552a0135a8c22dde545f
This commit is contained in:
@@ -28,7 +28,7 @@ class LinkBase(object):
|
||||
|
||||
timeout : Maximum wait time (None=no timeout)
|
||||
newcardonly : Should we wait for a new card, or an already
|
||||
inserted one ?
|
||||
inserted one ?
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -52,8 +52,8 @@ class LinkBase(object):
|
||||
|
||||
pdu : string of hexadecimal characters (ex. "A0A40000023F00")
|
||||
return : tuple(data, sw), where
|
||||
data : string (in hex) of returned data (ex. "074F4EFFFF")
|
||||
sw : string (in hex) of status word (ex. "9000")
|
||||
data : string (in hex) of returned data (ex. "074F4EFFFF")
|
||||
sw : string (in hex) of status word (ex. "9000")
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -62,8 +62,8 @@ class LinkBase(object):
|
||||
|
||||
pdu : string of hexadecimal characters (ex. "A0A40000023F00")
|
||||
return : tuple(data, sw), where
|
||||
data : string (in hex) of returned data (ex. "074F4EFFFF")
|
||||
sw : string (in hex) of status word (ex. "9000")
|
||||
data : string (in hex) of returned data (ex. "074F4EFFFF")
|
||||
sw : string (in hex) of status word (ex. "9000")
|
||||
"""
|
||||
data, sw = self.send_apdu_raw(pdu)
|
||||
|
||||
@@ -84,15 +84,15 @@ class LinkBase(object):
|
||||
|
||||
pdu : string of hexadecimal characters (ex. "A0A40000023F00")
|
||||
sw : string of 4 hexadecimal characters (ex. "9000"). The
|
||||
user may mask out certain digits using a '?' to add some
|
||||
ambiguity if needed.
|
||||
user may mask out certain digits using a '?' to add some
|
||||
ambiguity if needed.
|
||||
return : tuple(data, sw), where
|
||||
data : string (in hex) of returned data (ex. "074F4EFFFF")
|
||||
sw : string (in hex) of status word (ex. "9000")
|
||||
data : string (in hex) of returned data (ex. "074F4EFFFF")
|
||||
sw : string (in hex) of status word (ex. "9000")
|
||||
"""
|
||||
rv = self.send_apdu(pdu)
|
||||
|
||||
# Create a masked version of the returned status word
|
||||
# Create a masked version of the returned status word
|
||||
sw_masked = ""
|
||||
for i in range(0, 4):
|
||||
if sw.lower()[i] == '?':
|
||||
|
||||
Reference in New Issue
Block a user