def run_banner_output(cmd):
 banner_output = ('%s\n%%s\n\n' % cmd.center(60, '-'))
 command_output = ''
 try:
  cmd_out = utils.run(cmd, ignore_status=True, timeout=30)
  command_output = (cmd_out.stdout + cmd_out.stderr)
 except error.CmdError:
  command_output = 'Timed out'
 return (banner_output % command_output)

def run_banner_output ( cmd ) : banner_output = ( '%s\n%%s\n\n' % cmd . center ( 60 , '-' ) ) command_output = '' try : cmd_out = utils . run ( cmd , ignore_status = True , timeout = 30 ) command_output = ( cmd_out . stdout + cmd_out . stderr ) except error . CmdError : command_output = 'Timed out' return ( banner_output % command_output )
returns ------ cmd ------ cmd_output in a string .