From 515435cdc32c94fb7f5cd3d4f512303ccc5d1b9b Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 27 Mar 2017 19:41:56 +0100 Subject: [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 --- sos/utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"): -- cgit