Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: third_party/google-endpoints/urllib3/packages/ssl_match_hostname/__init__.py

Issue 2666783008: Add google-endpoints to third_party/. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 import sys
2
3 try:
4 # Our match_hostname function is the same as 3.5's, so we only want to
5 # import the match_hostname function if it's at least that good.
6 if sys.version_info < (3, 5):
7 raise ImportError("Fallback to vendored code")
8
9 from ssl import CertificateError, match_hostname
10 except ImportError:
11 try:
12 # Backport of the function from a pypi module
13 from backports.ssl_match_hostname import CertificateError, match_hostnam e
14 except ImportError:
15 # Our vendored copy
16 from ._implementation import CertificateError, match_hostname
17
18 # Not needed, but documenting what we provide.
19 __all__ = ('CertificateError', 'match_hostname')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698