[Pcsclite-git-commit] [PCSC] 01/01: Python 3: port FEATURE_CCID_ESC_COMMAND_Gemalto_features.py

Ludovic Rousseau rousseau at moszumanska.debian.org
Thu Feb 16 15:40:59 UTC 2017


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit 7c232a11e2e5515fd886733b3e382fc91ea0a8ab
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu Feb 16 11:56:32 2017 +0100

    Python 3: port FEATURE_CCID_ESC_COMMAND_Gemalto_features.py
---
 UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py b/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py
index 6bf2b1c..fe181f5 100755
--- a/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py
+++ b/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py
@@ -26,7 +26,10 @@ from smartcard.pcsc.PCSCPart10 import (SCARD_SHARE_DIRECT,
     PCSCv2_PART10_PROPERTY_wIdVendor, PCSCv2_PART10_PROPERTY_wIdProduct,
     getFeatureRequest, hasFeature)
 from smartcard.Exceptions import SmartcardException
-from itertools import izip
+try:
+    from itertools import izip
+except ImportError:
+    izip = zip
 
 
 # http://www.usb.org/developers/docs/USB_LANGIDs.pdf
@@ -71,7 +74,7 @@ def main():
     firmware_features = [0x6A]
     try:
         res = card_connection.control(ccid_esc_command, firmware_features)
-    except SmartcardException, ex:
+    except SmartcardException as ex:
         print("Failed:", ex)
         return
 
@@ -106,7 +109,7 @@ def main():
             # Reader is able to indicate the list of supported languages
             # through CCID-ESC 0x6B
             languages = card_connection.control(ccid_esc_command, [0x6B])
-        except SmartcardException, ex:
+        except SmartcardException as ex:
             print("Failed:", ex)
         print(" ", languages)
         languages = iter(languages)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list