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

Unified Diff: telemetry/third_party/webpagereplay/httpclient.py

Issue 1821953002: Roll web-page-replay to b03f84da6e90951d4275b5675533d4512a178398 (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « telemetry/third_party/webpagereplay/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/third_party/webpagereplay/httpclient.py
diff --git a/telemetry/third_party/webpagereplay/httpclient.py b/telemetry/third_party/webpagereplay/httpclient.py
index adae0d07cf39ab27f3d29e8e603d1beaed442c08..88ee9f39f1d4a2a9a22193bb4db6b4279b544f84 100644
--- a/telemetry/third_party/webpagereplay/httpclient.py
+++ b/telemetry/third_party/webpagereplay/httpclient.py
@@ -186,8 +186,12 @@ class DetailedHTTPSConnection(httplib.HTTPSConnection):
response_class = DetailedHTTPSResponse
def __init__(self, host, port):
- httplib.HTTPSConnection.__init__(
- self, host=host, port=port, context=ssl._create_unverified_context())
+ # https://www.python.org/dev/peps/pep-0476/#opting-out
+ if hasattr(ssl, '_create_unverified_context'):
+ httplib.HTTPSConnection.__init__(
+ self, host=host, port=port, context=ssl._create_unverified_context())
+ else:
+ httplib.HTTPSConnection.__init__(self, host=host, port=port)
class RealHttpFetch(object):
« no previous file with comments | « telemetry/third_party/webpagereplay/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698