diff options
author | Manuel Rüger <manuel@rueg.eu> | 2020-02-03 09:08:46 +0100 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2020-02-03 01:05:04 -0800 |
commit | 1aa33a8638610686ee2ca13d7f8c26604f2dd7ec (patch) | |
tree | e603ab4c9dbc6535f3a79501fbb5c162705cb6d6 /repoman | |
parent | sphinx-build: avoid autodoc ModuleNotFoundError for xattr (diff) | |
download | portage-1aa33a8638610686ee2ca13d7f8c26604f2dd7ec.tar.gz portage-1aa33a8638610686ee2ca13d7f8c26604f2dd7ec.tar.bz2 portage-1aa33a8638610686ee2ca13d7f8c26604f2dd7ec.zip |
Drop compat code for ancient python versions
Closes: https://github.com/gentoo/portage/pull/503
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'repoman')
-rw-r--r-- | repoman/lib/repoman/_subprocess.py | 18 | ||||
-rw-r--r-- | repoman/lib/repoman/gpg.py | 9 |
2 files changed, 0 insertions, 27 deletions
diff --git a/repoman/lib/repoman/_subprocess.py b/repoman/lib/repoman/_subprocess.py index b6c19bda3..2ca434010 100644 --- a/repoman/lib/repoman/_subprocess.py +++ b/repoman/lib/repoman/_subprocess.py @@ -20,15 +20,6 @@ def repoman_getstatusoutput(cmd): """ args = portage.util.shlex_split(cmd) - if sys.hexversion < 0x3020000 and sys.hexversion >= 0x3000000 and \ - not os.path.isabs(args[0]): - # Python 3.1 _execvp throws TypeError for non-absolute executable - # path passed as bytes (see https://bugs.python.org/issue8513). - fullname = find_binary(args[0]) - if fullname is None: - raise portage.exception.CommandNotFound(args[0]) - args[0] = fullname - encoding = _encodings['fs'] args = [ _unicode_encode(x, encoding=encoding, errors='strict') for x in args] @@ -53,15 +44,6 @@ class repoman_popen(portage.proxy.objectproxy.ObjectProxy): def __init__(self, cmd): args = portage.util.shlex_split(cmd) - if sys.hexversion < 0x3020000 and sys.hexversion >= 0x3000000 and \ - not os.path.isabs(args[0]): - # Python 3.1 _execvp throws TypeError for non-absolute executable - # path passed as bytes (see https://bugs.python.org/issue8513). - fullname = find_binary(args[0]) - if fullname is None: - raise portage.exception.CommandNotFound(args[0]) - args[0] = fullname - encoding = _encodings['fs'] args = [ _unicode_encode(x, encoding=encoding, errors='strict') diff --git a/repoman/lib/repoman/gpg.py b/repoman/lib/repoman/gpg.py index a3c12b3c9..7dac46f41 100644 --- a/repoman/lib/repoman/gpg.py +++ b/repoman/lib/repoman/gpg.py @@ -50,15 +50,6 @@ def gpgsign(filename, repoman_settings, options): # Encode unicode manually for bug #310789. gpgcmd = portage.util.shlex_split(gpgcmd) - if sys.hexversion < 0x3020000 and sys.hexversion >= 0x3000000 and \ - not os.path.isabs(gpgcmd[0]): - # Python 3.1 _execvp throws TypeError for non-absolute executable - # path passed as bytes (see https://bugs.python.org/issue8513). - fullname = find_binary(gpgcmd[0]) - if fullname is None: - raise portage.exception.CommandNotFound(gpgcmd[0]) - gpgcmd[0] = fullname - gpgcmd = [ _unicode_encode(arg, encoding=_encodings['fs'], errors='strict') for arg in gpgcmd] |