Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 526166 Details for
Bug 651946
net-wireless/crda python3 support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
key2pu.py python3 patch
key2pub_py.diff (text/plain), 1.48 KB, created by
Boris Staletic
on 2018-03-30 17:41:35 UTC
(
hide
)
Description:
key2pu.py python3 patch
Filename:
MIME Type:
Creator:
Boris Staletic
Created:
2018-03-30 17:41:35 UTC
Size:
1.48 KB
patch
obsolete
>diff --git a/utils/key2pub.py b/utils/key2pub.py >index 9bb04cd..d41af98 100755 >--- a/utils/key2pub.py >+++ b/utils/key2pub.py >@@ -3,12 +3,17 @@ > 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') > sys.exit(1) > >+if sys.version_info[0] == 2: >+ RANGE=xrange >+elif sys.version_info[0] >= 3: >+ RANGE=range >+ > def print_ssl_64(output, name, val): > while val[0] == '\0': > val = val[1:] >@@ -80,7 +85,7 @@ struct pubkey { > > static struct pubkey keys[] = { > ''') >- 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 >@@ -117,7 +122,7 @@ struct key_params { > > static const struct key_params __attribute__ ((unused)) keys[] = { > ''') >- 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') > >@@ -135,7 +140,7 @@ except IndexError: > 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(modes.keys()))) > sys.exit(2) > > output = open(outfile, 'w')
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 651946
: 526166 |
526168