added some Python 3 compatibility

This commit is contained in:
Frank Morgner
2018-05-02 16:21:44 +02:00
parent 0ad9405939
commit ae0d04f8b7
2 changed files with 4 additions and 4 deletions

View File

@@ -1353,8 +1353,8 @@ class MF(DF):
T != TAG["FILECONTROLINFORMATION"]):
raise ValueError
for tag, _, value in tlv_data:
exec tag2cmd.get(tag, 'unknown(tag, value)') in locals(),\
globals()
exec(tag2cmd.get(tag, 'unknown(tag, value)') in locals(),
globals())
if (args["filedescriptor"] & FDB["DF"]) == FDB["DF"]:
# FIXME: data for DF

View File

@@ -18,7 +18,7 @@
#
import binascii
import string
from ConstantDefinitions import MAX_SHORT_LE, MAX_EXTENDED_LE
from virtualsmartcard.ConstantDefinitions import MAX_SHORT_LE, MAX_EXTENDED_LE
def stringtoint(str):
@@ -44,7 +44,7 @@ def inttostring(i, length=None, len_extendable=False):
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):