summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-04-24 04:54:24 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-04-24 04:54:24 (GMT)
commit112717dd0b08797c49205313164c8ee08965ec8c (patch)
tree45664767963d0df55fee760217cef527ca20b10a /Lib/urllib2.py
parent6def78ae859903ce90f657d27728312f3f7daf2b (diff)
downloadcpython-112717dd0b08797c49205313164c8ee08965ec8c.zip
cpython-112717dd0b08797c49205313164c8ee08965ec8c.tar.gz
cpython-112717dd0b08797c49205313164c8ee08965ec8c.tar.bz2
Fix SF #1703110, Incorrect example for add_password() (use uri, not host)
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r--Lib/urllib2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 4e926a1..007e905 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -55,7 +55,10 @@ import urllib2
# set up authentication info
authinfo = urllib2.HTTPBasicAuthHandler()
-authinfo.add_password('realm', 'host', 'username', 'password')
+authinfo.add_password(realm='PDQ Application',
+ uri='https://mahler:8092/site-updates.py',
+ user='klem',
+ passwd='geheim$parole')
proxy_support = urllib2.ProxyHandler({"http" : "http://ahad-haam:3128"})