aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
blob: 3e7b0adda6e7e02fb5f8bf626f17a553d3a57bfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Mon, 27 Jan 2020 13:27:12 +0000
Subject: [PATCH] pcsc-spy: use python3 only

Python2 has been EOL and most distributions would not provide any
support for it anymore. Since Python3 is available in all distributions
now, switch pcsc-spy to use it exclusively.

Upstream-Status: Pending

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
 src/spy/pcsc-spy | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
index 85222c6..965138e 100755
--- a/src/spy/pcsc-spy
+++ b/src/spy/pcsc-spy
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#!/usr/bin/env python3
 
 """
 #    Display PC/SC functions arguments
@@ -22,12 +22,7 @@ from __future__ import print_function
 import os
 import signal
 import time
-try:
-    # for Python3
-    from queue import Queue
-except ImportError:
-    # for Python2
-    from Queue import Queue
+from queue import Queue
 from threading import Thread
 from operator import attrgetter
 
-- 
2.17.1