diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2009-12-24 02:18:14 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2009-12-24 02:18:14 (GMT) |
commit | f9a21f43c45eb23c953638c9c192e0053495bbc6 (patch) | |
tree | ec3ef5f0b83b0d02151e456c8dedabbb665f9e8d /Doc | |
parent | 3293593b5439a092e7423ccf13ed01f058fc2d63 (diff) | |
download | cpython-f9a21f43c45eb23c953638c9c192e0053495bbc6.zip cpython-f9a21f43c45eb23c953638c9c192e0053495bbc6.tar.gz cpython-f9a21f43c45eb23c953638c9c192e0053495bbc6.tar.bz2 |
Fix for Issue7570: Error in urllib2 example.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/urllib2.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst index 3e75f8c..cf889cc 100644 --- a/Doc/library/urllib2.rst +++ b/Doc/library/urllib2.rst @@ -945,10 +945,10 @@ programmatically-supplied proxy URLs, and adds proxy authorization support with :class:`ProxyBasicAuthHandler`. :: proxy_handler = urllib2.ProxyHandler({'http': 'http://www.example.com:3128/'}) - proxy_auth_handler = urllib2.HTTPBasicAuthHandler() + proxy_auth_handler = urllib2.ProxyBasicAuthHandler() proxy_auth_handler.add_password('realm', 'host', 'username', 'password') - opener = build_opener(proxy_handler, proxy_auth_handler) + opener = urllib2.build_opener(proxy_handler, proxy_auth_handler) # This time, rather than install the OpenerDirector, we use it directly: opener.open('http://www.example.com/login.html') |