Bug 1655948 - fix ssl context error on windows aarch64. r=aki

fix ssl context error on windows aarch64

Differential Revision: https://phabricator.services.mozilla.com/D85440
This commit is contained in:
Joel Maher 2020-07-30 17:15:10 +00:00
Родитель 9b0c71a8eb
Коммит 94d567acc4
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -410,7 +410,7 @@ class ScriptMixin(PlatformMixin):
# http://bugs.python.org/issue13359 - urllib2 does not automatically quote the URL
url_quoted = quote(url, safe='%/:=&?~#+!$,;\'@()*[]|')
# windows certificates need to be refreshed (https://bugs.python.org/issue36011)
if self.platform_name() in ('win64',):
if self.platform_name() in ('win64',) and platform.architecture()[0] in ('x64',):
if self.ssl_context is None:
self.ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
self.ssl_context.load_default_certs()

Просмотреть файл

@ -268,7 +268,7 @@ class TestingMixin(VirtualenvMixin, AutomationMixin, ResourceMonitoringMixin,
return _urlopen_basic_auth(url, **kwargs)
else:
# windows certificates need to be refreshed (https://bugs.python.org/issue36011)
if self.platform_name() in ('win64',):
if self.platform_name() in ('win64',) and platform.architecture()[0] in ('x64',):
if self.ssl_context is None:
self.ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
self.ssl_context.load_default_certs()