Kaynağa Gözat

Fix exception handling when checking account existence

Didn't catch changing the exception name when switching to
git-credential-luci earlier.

Issue can be seen in
https://groups.google.com/a/chromium.org/g/chromium-dev/c/Co66Vjzrbew/m/er7P7m6vAgAJ

Change-Id: I89674c1654980b1e2478868072ab28aa0d0bc7a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6120690
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Allen Li 7 ay önce
ebeveyn
işleme
93954a51a1
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      gerrit_util.py

+ 2 - 2
gerrit_util.py

@@ -893,9 +893,9 @@ class GitCredsAuthenticator(_Authenticator):
             return True
             return True
         try:
         try:
             info = GetAccountDetails(host, authenticator=cls())
             info = GetAccountDetails(host, authenticator=cls())
-        except auth.LoginRequiredError:
+        except auth.GitLoginRequiredError:
             LOGGER.debug(
             LOGGER.debug(
-                "Cannot check Gerrit account existence; missing luci-auth login"
+                "Cannot check Gerrit account existence; missing git-credential-luci login"
             )
             )
             return False
             return False
         except GerritError as e:
         except GerritError as e: