def GenerateUserReport(flags):
  """Run the command to create the report file.

  report_users error-exits if the file is found without --force.
  Instead, re-process the existing file in that situation.

  Args:
    flags: Argparse flags object with apps_domain, resume and first_n.
  """
  if FILE_MANAGER.FileExists(_REPORT_USERS_ORGS_FILE_NAME) and not flags.force:
    print 'Showing counts from existing file.'
    return

  print 'Generating new counts...'

  arg_list = [
      '--output_file=%s' % _REPORT_USERS_ORGS_FILE_NAME,
      '--csv_fields=%s' % ','.join(_REPORT_FILTER_FIELDS),
  ]
  for flag_value, flag_string in [
      (flags.apps_domain, flags.apps_domain % '--apps_domain=%s'),
      (flags.force, '--force'),
      (flags.verbose, '--verbose')]:
    if flag_value:
      arg_list.append(flag_string)
  try:
    cmd_utils.RunPyCmd('report_users.py', arg_list)
  except admin_api_tool_errors.AdminAPIToolCmdError as e:
    log_utils.LogError('Unable to generate org data.', e)
    sys.exit(1)
dataset/ETHPy150Open google/gfw-toolkit/toolkit/cmds/report_org_counts.py/GenerateUserReport/swapped operands of `%`