Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrey Zhizhikin <andrey.z@gmail.com> |
| 3 | Date: Mon, 27 Jan 2020 13:27:12 +0000 |
| 4 | Subject: [PATCH] pcsc-spy: use python3 only |
| 5 | |
| 6 | Python2 has been EOL and most distributions would not provide any |
| 7 | support for it anymore. Since Python3 is available in all distributions |
| 8 | now, switch pcsc-spy to use it exclusively. |
| 9 | |
| 10 | Upstream-Status: Pending |
| 11 | |
| 12 | Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> |
| 13 | --- |
| 14 | src/spy/pcsc-spy | 9 ++------- |
| 15 | 1 file changed, 2 insertions(+), 7 deletions(-) |
| 16 | |
| 17 | diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy |
| 18 | index 85222c6..965138e 100755 |
| 19 | --- a/src/spy/pcsc-spy |
| 20 | +++ b/src/spy/pcsc-spy |
| 21 | @@ -1,4 +1,4 @@ |
| 22 | -#! /usr/bin/python |
| 23 | +#!/usr/bin/env python3 |
| 24 | |
| 25 | """ |
| 26 | # Display PC/SC functions arguments |
| 27 | @@ -22,12 +22,7 @@ from __future__ import print_function |
| 28 | import os |
| 29 | import signal |
| 30 | import time |
| 31 | -try: |
| 32 | - # for Python3 |
| 33 | - from queue import Queue |
| 34 | -except ImportError: |
| 35 | - # for Python2 |
| 36 | - from Queue import Queue |
| 37 | +from queue import Queue |
| 38 | from threading import Thread |
| 39 | from operator import attrgetter |
| 40 | |
| 41 | -- |
| 42 | 2.17.1 |
| 43 | |