• Florian Mayer's avatar
    Do not crash for non URL (i.e. SSH) remotes. · ae510e8f
    Florian Mayer authored
    Without this change, having an SSH remote configured makes `git cl
    archive` crash:
    
    Traceback (most recent call last):
      File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 267, in print_notice_and_exit
        yield
      File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 5553, in <module>
        sys.exit(main(sys.argv[1:]))
      File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 5535, in main
        return dispatcher.execute(OptionParser(), argv)
      File "/usr/local/google/home/fmayer/depot_tools/subcommand.py", line 252, in execute
        return command(parser, args[1:])
      File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 252, in _inner
        return self._collect_metrics(func, command_name, *args, **kwargs)
      File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 232, in _collect_metrics
        gclient_utils.reraise(exception[0], exception[1], exception[2])
      File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 205, in _collect_metrics
        result = func(*args, **kwargs)
      File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 3786, in CMDarchive
        for cl, status in statuses
      File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 3599, in get_cl_statuses
        cl.EnsureAuthenticated(force=False, refresh=True)
      File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 1757, in EnsureAuthenticated
        if urllib.parse.urlparse(self.GetRemoteUrl()).scheme != 'https':
      File "/usr/lib/python2.7/urlparse.py", line 143, in urlparse
        tuple = urlsplit(url, scheme, allow_fragments)
      File "/usr/lib/python2.7/urlparse.py", line 201, in urlsplit
        i = url.find(':')
    AttributeError: 'NoneType' object has no attribute 'find'
    
    Change-Id: I6f794f11d3ed5e3dbedfe278ded660fca32abda6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2030505
    Commit-Queue: Florian Mayer <fmayer@google.com>
    Reviewed-by: 's avatarAnthony Polito <apolito@google.com>
    ae510e8f
Name
Last commit
Last update
..
gstools Loading commit data...
OWNERS Loading commit data...
auth_test.py Loading commit data...
bot_update_coverage_test.py Loading commit data...
cipd_bootstrap_test.py Loading commit data...
detect_host_arch_test.py Loading commit data...
download_from_google_storage_unittest.py Loading commit data...
fix_encoding_test.py Loading commit data...
gclient_eval_unittest.py Loading commit data...
gclient_paths_test.py Loading commit data...
gclient_scm_test.py Loading commit data...
gclient_smoketest.py Loading commit data...
gclient_test.py Loading commit data...
gclient_utils_test.py Loading commit data...
gerrit_util_test.py Loading commit data...
git_cache_test.py Loading commit data...
git_cl_creds_check_report.txt Loading commit data...
git_cl_test.py Loading commit data...
git_common_test.py Loading commit data...
git_dates_test.py Loading commit data...
git_drover_test.py Loading commit data...
git_footers_test.py Loading commit data...
git_hyper_blame_test.py Loading commit data...
git_map_test.py Loading commit data...
git_number_test.py Loading commit data...
git_rebase_update_test.py Loading commit data...
gsutil_test.py Loading commit data...
metrics_test.py Loading commit data...
ninjalog_uploader_test.py Loading commit data...
owners_finder_test.py Loading commit data...
owners_unittest.py Loading commit data...
presubmit_unittest.py Loading commit data...
recipes_test.py Loading commit data...
roll_dep_test.py Loading commit data...
scm_unittest.py Loading commit data...
subcommand_test.py Loading commit data...
subprocess2_test.py Loading commit data...
upload_to_google_storage_unittest.py Loading commit data...
watchlists_unittest.py Loading commit data...