AlkantarClanX12
Current Path : /proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/ |
Current File : //proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/netrc.cpython-35.opt-1.pyc |
��Yft � @ s| d Z d d l Z d d l Z d d l Z d d g Z Gd d � d e � Z Gd d � d � Z e d k rx e e � � d S)z-An object-oriented interface to .netrc files.� N�netrc�NetrcParseErrorc @ s4 e Z d Z d Z d d d d � Z d d � Z d S)r z5Exception raised on syntax errors in the .netrc file.Nc C s/ | | _ | | _ | | _ t j | | � d S)N)�filename�lineno�msg� Exception�__init__)�selfr r r � r �*/opt/alt/python35/lib64/python3.5/netrc.pyr s zNetrcParseError.__init__c C s d | j | j | j f S)Nz%s (%s, line %s))r r r )r r r r �__str__ s zNetrcParseError.__str__)�__name__� __module__�__qualname__�__doc__r r r r r r r s c @ sC e Z d Z d d d � Z d d � Z d d � Z d d � Z d S) r Nc C s� | d k } | d k rY y t j j t j d d � } Wn t k rX t d � � Yn Xi | _ i | _ t | � � } | j | | | � Wd QRXd S)N�HOMEz.netrcz'Could not find .netrc: $HOME is not set) �os�path�join�environ�KeyError�OSError�hosts�macros�open�_parse)r �file� default_netrc�fpr r r r s znetrc.__init__c C s� t j | � } | j d 7_ | j j d d � | _ x\| j } | j � } } | s\ Pn| d d k r� | j | k r9 t | � d k r9 | j j � q9 n� | d k r� | j � } n� | d k r� d } n� | d k rK| j � } g | j | <d | _ xD | j j � } | s#| d k r-d | _ P| j | j | � qWq9 n t d | | | j � � d } d } } i | j | <x | j � } | j d � s�| d k r| r�| | | f | j | <| j | � Pq�t d | | t | � f | | j � � q�| d k s| d k r*| j � } q�| d k rE| j � } q�| d k rtt j d k re| ret j | j � � } | j t j � k r9d d l } y | j | j � d } Wn t k r�d | j } Yn Xy | j t j � � d } Wn"