From 93954a51a1c0c113bd057704c883e3de0d20db31 Mon Sep 17 00:00:00 2001 From: Allen Li Date: Mon, 6 Jan 2025 12:33:13 -0800 Subject: [PATCH] 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 Commit-Queue: Allen Li Reviewed-by: Josip Sokcevic --- gerrit_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gerrit_util.py b/gerrit_util.py index d70fb2d66..5c8876306 100644 --- a/gerrit_util.py +++ b/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: