diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-24 04:53:12 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-24 04:53:12 (GMT) |
commit | 8eea9ac8891e88d5f063284f5d0119f50ebc0c0d (patch) | |
tree | 38e59d5e1158672765363e9b63f27aed3a787b33 /Lib | |
parent | d0bfa7454169606cfc0881c22e55c623d80c016c (diff) | |
download | cpython-8eea9ac8891e88d5f063284f5d0119f50ebc0c0d.zip cpython-8eea9ac8891e88d5f063284f5d0119f50ebc0c0d.tar.gz cpython-8eea9ac8891e88d5f063284f5d0119f50ebc0c0d.tar.bz2 |
Fix SF #1703110, Incorrect example for add_password() (use uri, not host)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/urllib2.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 7c73f81..8a1b61b 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"}) |