Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/keyring/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/keyring/cli.pyc

ó
F+ÞOc@s‹dZddlZddlmZddlZddlZddlZdefd„ƒYZdd„Z
edkr‡eje
ƒƒndS(s@Simple command line interface to get/set password from a keyringiÿÿÿÿN(tOptionParsertCommandLineToolcBs,eZd„Zd„Zd„Zd„ZRS(c	Cs`tddƒ|_|jjdddddddd	ƒ|jjd
ddddddd
ƒdS(Ntusages %prog [get|set] SERVICE USERNAMEs-ps--keyring-pathtdesttkeyring_pathtdefaultthelpsPath to the keyring backends-bs--keyring-backendtkeyring_backendsName of the keyring backend(Rtparsert
add_optiontNone(tself((s//usr/lib/python2.7/dist-packages/keyring/cli.pyt__init__
sc
Csi|jj|ƒ\}}y|\}}}WnDtk
rqt|ƒdkr^|jjƒdS|jjdƒnX|jdk	rÚy,tj	j
|j|jƒ}tj|ƒWqÚt
k
rÖ}|jjd|ƒqÚXn|dkrtj||ƒ}	|	dkrdS|j|	ƒdS|dkrU|jd||fƒ}	tj|||	ƒdS|jjdƒdS(	NiisWrong number of argumentss$Unable to load specified keyring: %stgettsetsPassword for '%s' in '%s': s'You can only 'get' or 'set' a password.(Rt
parse_argst
ValueErrortlent
print_helpterrorRR
tkeyringtcoretload_keyringRtset_keyringt	Exceptiontget_passwordtoutput_passwordtinput_passwordtset_password(
Rtargvtoptstargstkindtservicetusernametbackendtetpassword((s//usr/lib/python2.7/dist-packages/keyring/cli.pytruns8


	cCs
tj|ƒS(saAsk for a password to the user.

        This mostly exists to ease the testing process.
        (tgetpass(Rtprompt((s//usr/lib/python2.7/dist-packages/keyring/cli.pyRCscCs	|GHdS(sbOutput the password to the user.

        This mostly exists to ease the testing process.
        N((RR%((s//usr/lib/python2.7/dist-packages/keyring/cli.pyRLs(t__name__t
__module__RR&RR(((s//usr/lib/python2.7/dist-packages/keyring/cli.pyRs			-		cCs2|dkrtjd}ntƒ}|j|ƒS(sMain command line interface.iN(R
tsysRRR&(Rtcli((s//usr/lib/python2.7/dist-packages/keyring/cli.pytmainUs	t__main__(
t__doc__R'toptparseRR+Rtkeyring.coretobjectRR
R-R)texit(((s//usr/lib/python2.7/dist-packages/keyring/cli.pyt<module>sI