add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
B

�/g^�c@sXdZddlZddlZddlZddgZGdd�de�ZGdd�d�ZedkrTe	e��dS)z-An object-oriented interface to .netrc files.�N�netrc�NetrcParseErrorc@s"eZdZdZddd�Zdd�ZdS)rz5Exception raised on syntax errors in the .netrc file.NcCs"||_||_||_t�||�dS�N)�filename�lineno�msg�	Exception�__init__)�selfrrr�r
�/usr/lib64/python3.7/netrc.pyrszNetrcParseError.__init__cCsd|j|j|jfS)Nz%s (%s, line %s))rrr)r	r
r
r�__str__szNetrcParseError.__str__)NN)�__name__�
__module__�__qualname__�__doc__rrr
r
r
rr
s
c@s.eZdZd
dd�Zdd�Zdd�Zdd	�ZdS)rNc	CsX|dk}|dkr&tj�tj�d�d�}i|_i|_t|��}|�|||�WdQRXdS)Nz~z.netrc)�osZpathZjoinZ
expanduser�hosts�macrosZopen�_parse)r	�file�
default_netrc�fpr
r
rrs
znetrc.__init__cCs�t�|�}|jd7_|j�dd�|_�x�|j}|��}}|sFPn�|ddkrv|j|kr,t|�dkr,|j��q,n�|dkr�|��}nx|dkr�d}nj|dkr�|��}g|j	|<d	|_
x2|j��}	|	r�|	d
kr�d|_
P|j	|�|	�q�Wq,ntd|||j��d}
d}}i|j
|<�x�|��}|�d��s8|d
k�r||�r\|
||f|j
|<|�|�Pntd||t|�f||j���q|dk�s�|dk�r�|��}
�q|dk�r�|��}�q|dk�r�tjdk�r�|�r�t�|���}
|
jt��k�rzddl}y|�|
j�d}Wn tk
�r(d|
j}YnXy|�t���d}Wn"tk
�rbdt��}YnXtd||f||j��|
jtjtjB@�r�td||j��|��}ntd|||j���qWq,WdS)Nz !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~z#�r��machine�default�macdefz 	�
z 	
zbad toplevel token %r>rrrrz&malformed %s entry %s terminated by %s�login�user�account�passwordZposixzuid %sz9~/.netrc file owner (%s) does not match current user (%s)zY~/.netrc access too permissive: access permissions must restrict access to only the ownerzbad follower token %r)�shlexZ	wordcharsZ
commentersZreplacerZ	get_tokenZlenZinstreamZreadlinerZ
whitespaceZappendrrZ
startswithZ
push_tokenZreprrZnameZfstatZfilenoZst_uidZgetuid�pwdZgetpwuidZKeyErrorZst_mode�statZS_IRWXGZS_IRWXO)r	rrrZlexerZsaved_linenoZtoplevelZttZ	entryname�linerr r!Zpropr#Zfownerrr
r
rr s�












znetrc._parsecCs0||jkr|j|Sd|jkr(|jdSdSdS)z8Return a (user, account, password) tuple for given host.rN)r)r	�hostr
r
r�authenticatorsqs




znetrc.authenticatorscCs�d}xf|j��D]X}|j|}|d|�d|d�d�7}|drT|d|d�d�7}|d|d	�d�7}qWxF|j��D]8}|d
|�d�7}x|j|D]}||7}q�W|d7}qxW|S)z3Dump the class data in the format of a .netrc file.rzmachine z
	login rrrz		account z
	password izmacdef )rZkeysr)r	Zrepr&ZattrsZmacror%r
r
r�__repr__zs
znetrc.__repr__r)r
rrrrr'r(r
r
r
rrs
	Q	Z__main__)
rrr"r$Z__all__rrrr
Zprintr
r
r
rZ<module>st