aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Desrochers <eric.desrochers@canonical.com>2020-08-19 17:44:07 -0400
committerJake Hunsaker <jhunsake@redhat.com>2020-08-19 18:13:55 -0400
commit1d7bab6c7ce3f78758113ca3cdf3e9fa1762df24 (patch)
treee510f36245d123404b95c38150ae1ee1252469f6
parente54efa6e5895bbe5e8aacfc25f8c24dd1abc4201 (diff)
downloadsos-1d7bab6c7ce3f78758113ca3cdf3e9fa1762df24.tar.gz
[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>
-rw-r--r--sos/options.py2
1 files changed, 1 insertions, 1 deletions
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