def _subprocess(cmd):
 try:
  proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
  ret = utils.to_str(proc.communicate()[0]).strip()
  retcode = proc.wait()
  if ret:
   return ret
  elif (retcode != 1):
   return True
  else:
   return False
 except OSError as err:
  log.error(err)
  return False

def _subprocess ( cmd ) : try : proc = subprocess . Popen ( cmd , shell = True , stdout = subprocess . PIPE ) ret = utils . to_str ( proc . communicate ( ) [ 0 ] ) . strip ( ) retcode = proc . wait ( ) if ret : return ret elif ( retcode != 1 ) : return True else : return False except OSError as err : log . error ( err ) return False
function to standardize the subprocess call .