Skip to content

Commit 8584720

Browse files
committed
update
1 parent f7667c7 commit 8584720

File tree

1 file changed

+3
-2
lines changed
  • src/azure-cli/azure/cli/command_modules/acs

1 file changed

+3
-2
lines changed

src/azure-cli/azure/cli/command_modules/acs/custom.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,8 +2022,9 @@ def _urlopen_read(url, context=None):
20222022
context = _ssl_context()
20232023
try:
20242024
return urlopen(url, context=context).read()
2025-
except Exception as ex:
2026-
if "[SSL: CERTIFICATE_VERIFY_FAILED]" in ex and "unable to get local issuer certificate" in ex:
2025+
except URLError as ex:
2026+
error_msg = str(ex)
2027+
if "[SSL: CERTIFICATE_VERIFY_FAILED]" in error_msg and "unable to get local issuer certificate" in error_msg:
20272028
raise ClientRequestError(
20282029
"SSL certificate verification failed. Please ensure that the python interpreter used by azure-cli uses "
20292030
"the appropriate cert store when making requests. For more details, please refer to "

0 commit comments

Comments
 (0)