def run(self, command, *args):
self.log.debug("<STR_LIT>", '<STR_LIT:U+0020>'.join([command] + list(args)))<EOL>self.external_running_process = subprocess.Popen([command] + list(args),<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.STDOUT)<EOL>result = '<STR_LIT>'<EOL>while True:<EOL><INDENT>line = self.external_running_process.stdout.readline()<EOL>if not line:<EOL><INDENT>break<EOL><DEDENT>line = line.strip()<EOL>result += line<EOL>self.log.debug('<STR_LIT>' + line)<EOL><DEDENT>self.external_running_process.wait()<EOL>if self.external_running_process.returncode != <NUM_LIT:0> and self.user_aborted is False:<EOL><INDENT>raise subprocess.CalledProcessError(self.external_running_process.returncode, command)<EOL><DEDENT>self.user_aborted = False<EOL>return result<EOL>
Run a command on the local system.
Raises an exception on non-zero exit status, except when aborted
using the kill method.
Returns the output generated by the command.