Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 8120e73

Browse files
Comply with CI build rules.
1 parent 951f531 commit 8120e73

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hyper/tls.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ def init_context(cert_path=None, cert=None, cert_password=None):
9898
"""
9999
cafile = cert_path or cert_loc
100100
if not cafile or not path.exists(cafile):
101-
raise Exception, "No certificate found at " + str(cafile) + ". Either ensure the default cert.pem file is included in the distribution or provide a custom certificate when creating the connection."
101+
errMsg = ("No certificate found at " + str(cafile) + ". Either " +
102+
"ensure the default cert.pem file is included in the distribution " +
103+
"or provide a custom certificate when creating the connection.")
104+
raise Exception(errMsg)
105+
102106
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
103107
context.set_default_verify_paths()
104108
context.load_verify_locations(cafile=cafile)

0 commit comments

Comments
 (0)