Fixes BZ#1882015
This commit is contained in:
parent
bf76a5096e
commit
3a163c284d
38
0001-options-Fix-dict-order-py38-incompatibility.patch
Normal file
38
0001-options-Fix-dict-order-py38-incompatibility.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 1d7bab6c7ce3f78758113ca3cdf3e9fa1762df24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Desrochers <eric.desrochers@canonical.com>
|
||||||
|
Date: Wed, 19 Aug 2020 17:44:07 -0400
|
||||||
|
Subject: [PATCH 01/27] [options] Fix dict order py38 incompatibility
|
||||||
|
|
||||||
|
python-3.8 dict changes introduce a traceback during our config file
|
||||||
|
parsing for options with `-` characters in them.
|
||||||
|
|
||||||
|
Fix this by changing an iteration of the dict keys from `dict.keys()`
|
||||||
|
that returns a dict_keys view, to `list(dict)` which returns a list copy
|
||||||
|
of the keys.
|
||||||
|
|
||||||
|
Closes: #2206
|
||||||
|
Resolves: #2207
|
||||||
|
|
||||||
|
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
|
||||||
|
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
||||||
|
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
|
||||||
|
---
|
||||||
|
sos/options.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sos/options.py b/sos/options.py
|
||||||
|
index 3a2b4292..ba3db130 100644
|
||||||
|
--- a/sos/options.py
|
||||||
|
+++ b/sos/options.py
|
||||||
|
@@ -186,7 +186,7 @@ class SoSOptions():
|
||||||
|
if 'verbose' in odict.keys():
|
||||||
|
odict['verbosity'] = int(odict.pop('verbose'))
|
||||||
|
# convert options names
|
||||||
|
- for key in odict.keys():
|
||||||
|
+ for key in list(odict):
|
||||||
|
if '-' in key:
|
||||||
|
odict[key.replace('-', '_')] = odict.pop(key)
|
||||||
|
# set the values according to the config file
|
||||||
|
--
|
||||||
|
2.18.4
|
||||||
|
|
7
sos.spec
7
sos.spec
@ -3,7 +3,7 @@
|
|||||||
Summary: A set of tools to gather troubleshooting information from a system
|
Summary: A set of tools to gather troubleshooting information from a system
|
||||||
Name: sos
|
Name: sos
|
||||||
Version: 4.0
|
Version: 4.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz
|
Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -17,6 +17,7 @@ Requires: bzip2
|
|||||||
Requires: xz
|
Requires: xz
|
||||||
Requires: python3-pexpect
|
Requires: python3-pexpect
|
||||||
Obsoletes: sos-collector <= 1.9
|
Obsoletes: sos-collector <= 1.9
|
||||||
|
Patch1: 0001-options-Fix-dict-order-py38-incompatibility.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Sos is a set of tools that gathers information about system
|
Sos is a set of tools that gathers information about system
|
||||||
@ -26,6 +27,7 @@ support technicians and developers.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %{name}-%{version}
|
%setup -qn %{name}-%{version}
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -58,6 +60,9 @@ install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
|||||||
%config(noreplace) %{_sysconfdir}/sos/sos.conf
|
%config(noreplace) %{_sysconfdir}/sos/sos.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 24 2020 Sandro Bonazzola <sbonazzo@redhat.com> - 4.0-2
|
||||||
|
- Fixes BZ#1882015
|
||||||
|
|
||||||
* Mon Sep 14 2020 Sandro Bonazzola <sbonazzo@redhat.com> - 4.0-1
|
* Mon Sep 14 2020 Sandro Bonazzola <sbonazzo@redhat.com> - 4.0-1
|
||||||
- Update to 4.0 (#1869464)
|
- Update to 4.0 (#1869464)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user