mirror of
https://github.com/python/cpython.git
synced 2025-08-18 15:51:23 +00:00
Fix SF #1703110, Incorrect example for add_password() (use uri, not host)
This commit is contained in:
parent
6def78ae85
commit
112717dd0b
2 changed files with 8 additions and 2 deletions
|
@ -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"})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue