[Pcsclite-git-commit] [PCSC] 02/02: pcsc-spy: port to Python3

Ludovic Rousseau rousseau at moszumanska.debian.org
Thu Apr 20 15:57:32 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 59489545659447d297e51f3c3c281f377d350851
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu Apr 20 10:33:22 2017 +0200

    pcsc-spy: port to Python3
    
    On Python3 the Queue module is called queue.
    
    The program now works with Python 2.7 and Python 3.4.
    
    Thanks to Johannes Meixner for the bug report
    "Make pcsc-spy python3-ready"
    https://github.com/LudovicRousseau/PCSC/issues/19
---
 src/spy/pcsc-spy | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
index 1704834..cef0e1e 100755
--- a/src/spy/pcsc-spy
+++ b/src/spy/pcsc-spy
@@ -22,7 +22,12 @@ from __future__ import print_function
 import os
 import signal
 import time
-from Queue import Queue
+try:
+    # for Python3
+    from queue import Queue
+except ImportError:
+    # for Python2
+    from Queue import Queue
 from threading import Thread
 from operator import attrgetter
 

-- 
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