diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2017-03-27 19:41:56 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-03-27 19:43:42 +0100 |
commit | 515435cdc32c94fb7f5cd3d4f512303ccc5d1b9b (patch) | |
tree | 2036c2b8e911b401fe684e70e67e65177f0b972a | |
parent | eaab6422af48afa36eacad466b3093dc3f00de05 (diff) | |
download | sos-515435cdc32c94fb7f5cd3d4f512303ccc5d1b9b.tar.gz |
[utilities] make sos_get_command_output() python3 compatible
The iteritems() member has been removed in python3. Since the
environment loop in sos_get_command_output() is not expected to
be run with very large inputs use .items() instead, which is
compatible with both python2 and python3.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/utilities.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/utilities.py b/sos/utilities.py index bc998fa8..af60f823 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -129,7 +129,7 @@ def sos_get_command_output(command, timeout=300, stderr=False, cmd_env['LC_ALL'] = 'C' # optionally add an environment change for the command if env: - for key, value in env.iteritems(): + for key, value in env.items(): cmd_env[key] = value # use /usr/bin/timeout to implement a timeout if timeout and is_executable("timeout"): |