def get_output_error(cmd):
 if (not isinstance(cmd, list)):
  cmd = [cmd]
 logging.debug('Running: %s', ' '.join(map(quote, cmd)))
 try:
  result = Popen(cmd, stdout=PIPE, stderr=PIPE)
 except IOError as e:
  return ((-1), u(''), u(('Failed to run %r: %r' % (cmd, e))))
 (so, se) = result.communicate()
 so = so.decode('utf8', 'replace')
 se = se.decode('utf8', 'replace')
 return (result.returncode, so, se)

def get_output_error ( cmd ) : if ( not isinstance ( cmd , list ) ) : cmd = [ cmd ] logging . debug ( 'Running: %s' , ' ' . join ( map ( quote , cmd ) ) ) try : result = Popen ( cmd , stdout = PIPE , stderr = PIPE ) except IOError as e : return ( ( - 1 ) , u ( '' ) , u ( ( 'Failed to run %r: %r' % ( cmd , e ) ) ) ) ( so , se ) = result . communicate ( ) so = so . decode ( 'utf8' , 'replace' ) se = se . decode ( 'utf8' , 'replace' ) return ( result . returncode , so , se )
return the exit status .