def main():
  parser = argparse.ArgumentParser()
  parser.add_argument('action', choices=['download', 'upload'],
                      help='Which action to perform')
  parser.add_argument('--dry_run', action='store_true',
                      default=False, help='Dry run for uploading')
  args = parser.parse_args()

  if args.action == 'download':
    for d in GOLDEN_DIRECTORIES:
      download(d, _is_file_of_interest,
               'RenderTest Goldens', STORAGE_BUCKET)
  else:
    for d in GOLDEN_DIRECTORIES:
      upload(d, _is_file_of_interest,
             'RenderTest Goldens', STORAGE_BUCKET, args.dry_run)
def main():
  parser = argparse.ArgumentParser()
  parser.add_argument('action', choices=['download', 'upload'],
                      help='Which action to perform')
  parser.add_argument('--dry_run', action='store_true',
                      default=False, help='Dry run for uploading')
  args = parser.parse_args()

  if args.action == 'download':
    for d in _GetReplayTestDirectories():
      download(d, _is_file_of_interest,
               'WPR archives', STORAGE_BUCKET)
  else:
    for d in _GetReplayTestDirectories():
      upload(d, _is_file_of_interest,
             'WPR archives', STORAGE_BUCKET, args.dry_run)
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('action',
                        choices=['download', 'upload'],
                        help='Which action to perform')
    parser.add_argument('--dry_run',
                        action='store_true',
                        default=False,
                        help='Dry run for uploading')
    args = parser.parse_args()

    if args.action == 'download':
        for d in WPR_RECORD_REPLAY_TEST_DIRECTORIES:
            download(d, _is_file_of_interest, 'WPR archives', STORAGE_BUCKET)
            if not verify_file_exists(d, _is_file_of_interest):
                logging.error(
                    'There is not file of interest in dir {}'.format(d))
    else:
        for d in WPR_RECORD_REPLAY_TEST_DIRECTORIES:
            upload(d, _is_file_of_interest, 'WPR archives', STORAGE_BUCKET,
                   args.dry_run)