Skip to content
Snippets Groups Projects
Commit fd4fa909 authored by Mark Haines's avatar Mark Haines
Browse files

The new parameter to urlopen is "context" not "ctx"

parent ced39d01
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ def request_registration(user, password, server_location, shared_secret): ...@@ -52,7 +52,7 @@ def request_registration(user, password, server_location, shared_secret):
if sys.version_info[:3] >= (2, 7, 9): if sys.version_info[:3] >= (2, 7, 9):
# As of version 2.7.9, urllib2 now checks SSL certs # As of version 2.7.9, urllib2 now checks SSL certs
import ssl import ssl
f = urllib2.urlopen(req, ctx=ssl.SSLContext(ssl.PROTOCOL_SSLv23)) f = urllib2.urlopen(req, context=ssl.SSLContext(ssl.PROTOCOL_SSLv23))
else: else:
f = urllib2.urlopen(req) f = urllib2.urlopen(req)
f.read() f.read()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment