mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-22 18:22:12 +01:00
Merge pull request #1124 from hramrach/0.x-maint
Fixes for running on SLE12
This commit is contained in:
commit
1222942954
6
.github/workflows/unittests.yaml
vendored
6
.github/workflows/unittests.yaml
vendored
@ -50,7 +50,7 @@ jobs:
|
||||
zypper --non-interactive --gpg-auto-import-keys refresh
|
||||
zypper --non-interactive dist-upgrade
|
||||
zypper --non-interactive install git-lfs
|
||||
zypper --non-interactive install diffstat diffutils python3 python3-chardet python3-M2Crypto python3-pip python3-rpm python3-setuptools
|
||||
zypper --non-interactive install diffstat diffutils python3 python3-M2Crypto python3-pip python3-rpm python3-setuptools
|
||||
|
||||
- name: 'Install packages (Fedora/CentOS)'
|
||||
if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }}
|
||||
@ -58,7 +58,7 @@ jobs:
|
||||
dnf -y makecache
|
||||
dnf -y distro-sync
|
||||
dnf -y install git-lfs
|
||||
dnf -y install diffstat diffutils python3 python3-chardet python3-m2crypto python3-pip python3-rpm python3-setuptools
|
||||
dnf -y install diffstat diffutils python3 python3-m2crypto python3-pip python3-rpm python3-setuptools
|
||||
|
||||
- name: 'Install packages (Debian/Ubuntu)'
|
||||
if: ${{ startsWith(matrix.container, 'debian:') || startsWith(matrix.container, 'ubuntu:') }}
|
||||
@ -66,7 +66,7 @@ jobs:
|
||||
apt-get -y update
|
||||
apt-get -y upgrade
|
||||
apt-get -y --no-install-recommends install git-lfs
|
||||
apt-get -y --no-install-recommends install diffstat diffutils python3 python3-chardet python3-m2crypto python3-pip python3-rpm python3-setuptools
|
||||
apt-get -y --no-install-recommends install diffstat diffutils python3 python3-m2crypto python3-pip python3-rpm python3-setuptools
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -537,7 +537,11 @@ def _build_opener(apiurl):
|
||||
def http_error_401(self, req, fp, code, msg, headers):
|
||||
self._rewind_request(req)
|
||||
authreqs = {}
|
||||
for authreq in headers.get_all('www-authenticate', []):
|
||||
if hasattr(headers, "get_all"):
|
||||
all_headers = headers.get_all('www-authenticate', [])
|
||||
else:
|
||||
all_headers = headers.getallmatchingheaders('www-authenticate')
|
||||
for authreq in all_headers:
|
||||
scheme = authreq.split()[0].lower()
|
||||
authreqs[scheme] = authreq
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import importlib
|
||||
import bz2
|
||||
import base64
|
||||
@ -29,7 +31,6 @@ except BaseException as e:
|
||||
print(msg, e, file=sys.stderr)
|
||||
gnomekeyring = None
|
||||
|
||||
from . import conf
|
||||
from . import oscerr
|
||||
|
||||
|
||||
@ -234,6 +235,7 @@ class KeyringCredentialsManager(AbstractCredentialsManager):
|
||||
keyring_backend = keyring.core.load_keyring(self._backend_cls_name)
|
||||
except ModuleNotFoundError:
|
||||
msg = "Invalid credentials_mgr_class: {}".format(self._backend_cls_name)
|
||||
from . import conf
|
||||
raise oscerr.ConfigError(msg, conf.config['conffile'])
|
||||
keyring.set_keyring(keyring_backend)
|
||||
|
||||
@ -420,6 +422,7 @@ def create_credentials_manager(url, cp):
|
||||
creds_mgr = getattr(importlib.import_module(mod), cls).create(cp, options)
|
||||
except ModuleNotFoundError:
|
||||
msg = "Invalid credentials_mgr_class: {}".format(creds_mgr_cls)
|
||||
from . import conf
|
||||
raise oscerr.ConfigError(msg, conf.config['conffile'])
|
||||
return creds_mgr
|
||||
|
||||
|
3
setup.py
3
setup.py
@ -103,7 +103,7 @@ setuptools.setup(
|
||||
packages=['osc', 'osc.util'],
|
||||
scripts=['osc-wrapper.py'],
|
||||
data_files=data_files,
|
||||
install_requires=['M2Crypto', 'chardet'],
|
||||
install_requires=['M2Crypto'],
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Console",
|
||||
@ -129,5 +129,4 @@ setuptools.setup(
|
||||
],
|
||||
# Override certain command classes with our own ones
|
||||
cmdclass=cmdclass,
|
||||
test_suite="tests",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user