aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2020-01-20 13:08:19 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2020-10-21 19:32:17 +0200
commit73209814814eb4eddc0299aba9473947fc6081d0 (patch)
treee5b55afe5347b541478103a5325c44b6f12d0682
parentbb460fb3cbe1953c7b2f9a40d2226989e8b07670 (diff)
downloadmeta-openembedded-contrib-jansa/master.tar.gz
meta-openembedded-contrib-jansa/master.tar.bz2
meta-openembedded-contrib-jansa/master.zip
crda: use python3jansa/master
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/crda/crda/use-python3.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/crda/crda/use-python3.patch b/meta-networking/recipes-connectivity/crda/crda/use-python3.patch
new file mode 100644
index 0000000000..a617031177
--- /dev/null
+++ b/meta-networking/recipes-connectivity/crda/crda/use-python3.patch
@@ -0,0 +1,42 @@
+diff -uNr crda-3.18/utils/key2pub.py crda-3.18.new/utils/key2pub.py
+--- crda-3.18/utils/key2pub.py 2020-01-20 05:20:30.078327807 -0800
++++ crda-3.18.new/utils/key2pub.py 2020-01-20 05:21:37.590807585 -0800
+@@ -1,9 +1,9 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ import sys
+ try:
+ from M2Crypto import RSA
+-except ImportError, e:
++except ImportError as e:
+ sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message)
+ sys.stderr.write('Please install the "M2Crypto" Python module.\n')
+ sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n')
+@@ -81,7 +81,7 @@
+
+ static struct pubkey keys[] __attribute__((unused))= {
+ ''')
+- for n in xrange(n + 1):
++ for n in range(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+ output.write('};\n')
+ pass
+@@ -118,7 +118,7 @@
+
+ static const struct key_params keys[] __attribute__((unused))= {
+ ''')
+- for n in xrange(n + 1):
++ for n in range(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+ output.write('};\n')
+
+@@ -136,7 +136,7 @@
+ mode = None
+
+ if not mode in modes:
+- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))
++ print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(list(modes.keys()))))
+ sys.exit(2)
+
+ output = open(outfile, 'w')