%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/netrc.pyc

ó
Mêáac@s˜dZddlZddlZddlZejdkrHddlZnddgZdefd„ƒYZdd	d„ƒYZ	e
dkr”e	ƒGHndS(
s-An object-oriented interface to .netrc files.iÿÿÿÿNtposixtnetrctNetrcParseErrorcBs&eZdZddd„Zd„ZRS(s5Exception raised on syntax errors in the .netrc file.cCs/||_||_||_tj||ƒdS(N(tfilenametlinenotmsgt	Exceptiont__init__(tselfRRR((s!/usr/local/lib/python2.7/netrc.pyRs			cCsd|j|j|jfS(Ns%s (%s, line %s)(RRR(R((s!/usr/local/lib/python2.7/netrc.pyt__str__sN(t__name__t
__module__t__doc__tNoneRR	(((s!/usr/local/lib/python2.7/netrc.pyRscBs/eZdd„Zd„Zd„Zd„ZRS(cCs™|dk}|dkr[y tjjtjddƒ}Wq[tk
rWtdƒ‚q[Xni|_i|_t	|ƒ}|j
|||ƒWdQXdS(NtHOMEs.netrcs'Could not find .netrc: $HOME is not set(R
tostpathtjointenvirontKeyErrortIOErrorthoststmacrostopent_parse(Rtfilet
default_netrctfp((s!/usr/local/lib/python2.7/netrc.pyRs 
		cCstj|ƒ}|jd7_|jjddƒ|_x`|jƒ}}|sSPn|ddkršt|ƒd}|jj|dƒ|jjƒq9nÇ|dkrµ|jƒ}n¬|dkrÊd}n—|dkrH|jƒ}g|j	|<d	|_
xG|jjƒ}	|	s|	d
kr*d|_
Pn|j	|j|	ƒqûWq9ntd|||j
ƒ‚d}
d}}i|j|<x|jƒ}|jdƒs´|ddddhkr|rá|
||f|j|<|j|ƒPq‘td
||t|ƒf||j
ƒ‚q|dks$|dkr3|jƒ}
q|dkrN|jƒ}q|dkrxtjdkri|ritj|jƒƒ}
|
jtjƒkr7ytj|
jƒd}Wntk
rÓd|
j}nXytjtjƒƒd}Wn!tk
rdtjƒ}nXtd||f||j
ƒ‚n|
jtjtjB@ritd||j
ƒ‚qin|jƒ}qtd|||j
ƒ‚qWq9WdS(Ns !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~t#tiitmachinetdefaulttmacdefs 	s
s 	
sbad toplevel token %rs&malformed %s entry %s terminated by %stlogintusertaccounttpasswordRsuid %ss9~/.netrc file owner (%s) does not match current user (%s)sY~/.netrc access too permissive: access permissions must restrict access to only the ownersbad follower token %r( tshlext	wordcharst
commenterstreplacet	get_tokentlentinstreamtseektreadlineRt
whitespacetappendRRR
Rt
startswitht
push_tokentreprRtnametfstattfilenotst_uidtgetuidtpwdtgetpwuidRtst_modetstattS_IRWXGtS_IRWXO(RRRRtlexerttoplevelttttpost	entrynametlineR!R#R$tproptfownerR"((s!/usr/local/lib/python2.7/netrc.pyR%sŽ
	
		






cCs<||jkr|j|Sd|jkr4|jdSdSdS(s8Return a (user, account, password) tuple for given host.RN(RR
(Rthost((s!/usr/local/lib/python2.7/netrc.pytauthenticatorsws
cCsâd}xy|jjƒD]h}|j|}|djd|d|ƒ7}|drh|djd|ƒ7}n|djd|ƒ7}qWxY|jjƒD]H}|djd	|ƒ7}x|j|D]}||7}q¼W|d
7}q’W|S(s3Dump the class data in the format of a .netrc file.Rs!machine {host}
	login {attrs[0]}
RFtattrsis	account {attrs[1]}
s	password {attrs[2]}
smacdef {macro}
tmacros
(RtkeystformatR(RtrepRFRHRIRC((s!/usr/local/lib/python2.7/netrc.pyt__repr__€s

N(R
RR
RRRGRM(((s!/usr/local/lib/python2.7/netrc.pyRs	R		t__main__((RRR;R%R3R8t__all__RRRR
(((s!/usr/local/lib/python2.7/netrc.pyt<module>s$x

Zerion Mini Shell 1.0