summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0011-tests-check-requirements--simplify-and-support-python-3.8.patch
blob: ea48c83b84afacb07a0a1186e6d78bd468613b1d (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
tests/check-requirements: simplify and support python 3.8

Written by: Jamie Strandboge <jamie@ubuntu.com>

The patch was imported from git://git.launchpad.net/ufw
commit id e30f8bc2aeb317d152e74a270a8e1336de06cee6

Upstream-Status: Backport

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>

diff --git a/tests/check-requirements b/tests/check-requirements
index e873703..82fab08 100755
--- a/tests/check-requirements
+++ b/tests/check-requirements
@@ -45,7 +45,7 @@ runcmd() {
 # check python
 found_python="no"
 echo -n "Has python: "
-for exe in python2.7 python2.6 python2.5 python3.2 python; do
+for exe in python3 python2 python; do
     if ! which $exe >/dev/null 2>&1; then
         continue
     fi
@@ -54,7 +54,7 @@ for exe in python2.7 python2.6 python2.5 python3.2 python; do
         echo "pass (binary: $exe, version: $v, py2)"
         found_python="yes"
         break
-    elif echo "$v" | grep -q "^3.[2]"; then
+    elif echo "$v" | grep -q "^3.[2-8]"; then
         echo "pass (binary: $exe, version: $v, py3)"
         found_python="yes"
         break