Ver Fonte

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 há 7 meses atrás
pai
commit
93954a51a1
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      gerrit_util.py

+ 2 - 2
gerrit_util.py

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