/usr/lib/python3/dist-packages/keyring/__pycache__
Edit: /usr/lib/python3/dist-packages/keyring/__pycache__/http.cpython-310.pyc (1670B)
o
ÞñÐaÏ ã @ s2 d Z ddlZddlmZmZmZ G dd„ dƒZdS )a‚
urllib2.HTTPPasswordMgr object using the keyring, for use with the
urllib2.HTTPBasicAuthHandler.
usage:
import urllib2
handlers = [urllib2.HTTPBasicAuthHandler(PasswordMgr())]
urllib2.install_opener(handlers)
urllib2.urlopen(...)
This will prompt for a password if one is required and isn't already
in the keyring. Then, it adds it to the keyring for subsequent use.
é Né )Úget_passwordÚdelete_passwordÚset_passwordc @ s, e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd S )
ÚPasswordMgrc C s t ¡ S ©N)ÚgetpassÚgetuser)ÚselfÚrealmÚauthuri© r
ú./usr/lib/python3/dist-packages/keyring/http.pyÚget_username s zPasswordMgr.get_usernamec C s | ||¡}t|||ƒ d S r )r r )r
r r ÚpasswordÚuserr
r
r Úadd_password s zPasswordMgr.add_passwordc C sF | ||¡}t||ƒ}|d u rdtƒ }t |¡}t|||ƒ ||fS )Nz1password for %(user)s@%(realm)s for %(authuri)s: )r r Úvarsr r )r
r r r r Úpromptr
r
r Úfind_user_password s
zPasswordMgr.find_user_passwordc C s | ||¡}t||ƒ d S r )r r )r
r r r r
r
r Úclear_password% s zPasswordMgr.clear_passwordN)Ú__name__Ú
__module__Ú__qualname__r r r r r
r
r
r r s
r )Ú__doc__r Ú r r r r r
r
r
r Ú
s