def _Popen(command, output=False, directory='.', runas=None, env=(), exitcode=0, use_vt=False, loglevel=None):
 ret = None
 directory = os.path.abspath(directory)
 if isinstance(command, list):
  command = ' '.join(command)
 LOG.debug(u'Running {0}'.format(command))
 if (not loglevel):
  loglevel = 'debug'
 ret = __salt__['cmd.run_all'](command, cwd=directory, output_loglevel=loglevel, runas=runas, env=env, use_vt=use_vt, python_shell=False)
 out = ((ret['stdout'] + '\n\n') + ret['stderr'])
 if ((exitcode is not None) and (ret['retcode'] != exitcode)):
  raise _BuildoutError(out)
 ret['output'] = out
 if output:
  ret = out
 return ret

def _Popen ( command , output = False , directory = '.' , runas = None , env = ( ) , exitcode = 0 , use_vt = False , loglevel = None ) : ret = None directory = os . path . abspath ( directory ) if isinstance ( command , list ) : command = ' ' . join ( command ) LOG . debug ( u'Running {0}' . format ( command ) ) if ( not loglevel ) : loglevel = 'debug' ret = __salt__ [ 'cmd.run_all' ] ( command , cwd = directory , output_loglevel = loglevel , runas = runas , env = env , use_vt = use_vt , python_shell = False ) out = ( ( ret [ 'stdout' ] + '\n\n' ) + ret [ 'stderr' ] ) if ( ( exitcode is not None ) and ( ret [ 'retcode' ] != exitcode ) ) : raise _BuildoutError ( out ) ret [ 'output' ] = out if output : ret = out return ret
run a command .