added some Python 3 compatibility
This commit is contained in:
@@ -1353,8 +1353,8 @@ class MF(DF):
|
|||||||
T != TAG["FILECONTROLINFORMATION"]):
|
T != TAG["FILECONTROLINFORMATION"]):
|
||||||
raise ValueError
|
raise ValueError
|
||||||
for tag, _, value in tlv_data:
|
for tag, _, value in tlv_data:
|
||||||
exec tag2cmd.get(tag, 'unknown(tag, value)') in locals(),\
|
exec(tag2cmd.get(tag, 'unknown(tag, value)') in locals(),
|
||||||
globals()
|
globals())
|
||||||
|
|
||||||
if (args["filedescriptor"] & FDB["DF"]) == FDB["DF"]:
|
if (args["filedescriptor"] & FDB["DF"]) == FDB["DF"]:
|
||||||
# FIXME: data for DF
|
# FIXME: data for DF
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
import binascii
|
import binascii
|
||||||
import string
|
import string
|
||||||
from ConstantDefinitions import MAX_SHORT_LE, MAX_EXTENDED_LE
|
from virtualsmartcard.ConstantDefinitions import MAX_SHORT_LE, MAX_EXTENDED_LE
|
||||||
|
|
||||||
|
|
||||||
def stringtoint(str):
|
def stringtoint(str):
|
||||||
@@ -44,7 +44,7 @@ def inttostring(i, length=None, len_extendable=False):
|
|||||||
return str
|
return str
|
||||||
|
|
||||||
|
|
||||||
_myprintable = " " + string.letters + string.digits + string.punctuation
|
_myprintable = " " + string.ascii_letters + string.digits + string.punctuation
|
||||||
|
|
||||||
|
|
||||||
def hexdump(data, indent=0, short=False, linelen=16, offset=0):
|
def hexdump(data, indent=0, short=False, linelen=16, offset=0):
|
||||||
|
|||||||
Reference in New Issue
Block a user