From 257656d75e5b0a68193409711bda3140dfcb092d Mon Sep 17 00:00:00 2001 From: "senthil.kumaran" Date: Thu, 24 Dec 2009 02:18:14 +0000 Subject: [PATCH] Fix for Issue7570: Error in urllib2 example. git-svn-id: http://svn.python.org/projects/python/trunk@77018 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Doc/library/urllib2.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst index 3e75f8c965..cf889cc63f 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') -- 2.11.4.GIT