def attach_root_command_outputs(report, command_map):
'''Execute multiple commands as root and put their outputs into report.
command_map is a keyname -> 'shell command' dictionary with the commands to
run. They are all run through /bin/sh, so you need to take care of shell
escaping yourself. To include stderr output of a command, end it with
"2>&1".
Just like root_command_output() this will use gksu, kdesudo, or sudo for
gaining root privileges, depending on the running desktop environment.
This is preferrable to using root_command_output() multiple times, as that
will ask for the password every time.
'''
Fixed upstream. I added a new method
def attach_ root_command_ outputs( report, command_map):
'''Execute multiple commands as root and put their outputs into report.
command_map is a keyname -> 'shell command' dictionary with the commands to
run. They are all run through /bin/sh, so you need to take care of shell
escaping yourself. To include stderr output of a command, end it with
"2>&1".
Just like root_command_ output( ) this will use gksu, kdesudo, or sudo for
gaining root privileges, depending on the running desktop environment.
This is preferrable to using root_command_ output( ) multiple times, as that
will ask for the password every time.
'''