1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Description: Fix dict order incompability
Fix dictionary keys changed during iteration.
Author: Eric Desrochers <eric.desrochers@canonical.com>
Origin: upstream, https://github.com/sosreport/sos/commit/1d7bab6c7
Bug: https://github.com/sosreport/sos/issues/2206
--- sos-4.0.orig/sos/options.py
+++ sos-4.0/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
|