def check_command_output(cmd, error_message="", skip_error=False):
  try:
    out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
  except BaseException, e:
    if skip_error:
      return 0
    else:
      Log.print_critical('ERROR: %s' % error_message if error_message else str(e))
  return 1
dataset/ETHPy150Open XiaoMi/minos/build/build_utils.py/check_command_output/original