Fix error in gclient_scm.py during processing git configs

After commit https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5252498
appers error:
File ".../depot_tools/gclient_scm.py", line 884, in update
    strp_current_url = current_url[:-4] if current_url.endswith(
                                           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'

R=gavinmak@google.com

Bug: 372510000
Change-Id: I76ee56ad909eafb832ad7f8d155ccd6cec5cade4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5920707
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Igor Makarov <klim.iv@gmail.com>
changes/07/5920707/5
Igor 7 months ago committed by LUCI CQ
parent a31b55235f
commit 1e559a2828

@ -876,7 +876,8 @@ class GitWrapper(SCMWrapper):
# See if the url has changed (the unittests use git://foo for the url,
# let that through).
current_url = scm.GIT.GetConfig(self.checkout_path,
f'remote.{self.remote}.url')
f'remote.{self.remote}.url',
default='')
return_early = False
# TODO(maruel): Delete url != 'git://foo' since it's just to make the
# unit test pass. (and update the comment above)

Loading…
Cancel
Save