ó
Ýēk^c           @` s   d  d l  m Z m Z m Z d  d l m Z d  d l m Z e e  Z	 d   Z
 d	 d  Z d
 d  d  Z d d  d  Z d S(   i    (   t   print_functiont   divisiont   absolute_import(   t	   getLogger(   t   dedentc         C` s   t  |   j   S(   s   dedent and left-strip(   R   t   lstrip(   t   string(    (    s7   lib/python2.7/site-packages/conda/_vendor/auxlib/ish.pyt   dals	   s    c         C` se   y t  |  |  SWnM t k
 r` x= | D]. } y t  |  |  SWq( t k
 rU q( q( Xq( W  n Xd  S(   N(   t   getattrt   AttributeError(   t   objt	   attr_namet   aliasest   alias(    (    s7   lib/python2.7/site-packages/conda/_vendor/auxlib/ish.pyt	   _get_attr   s    c         C` s{   y> t  | | |  |  } | d k	 r) | St |  | d |  SWn6 t k
 re t |  | | | d  St k
 rv d SXd S(   s  Return the value of the first key found in the list of search_maps,
    otherwise return None.

    Examples:
        >>> from .collection import AttrDict
        >>> d1 = AttrDict({'a': 1, 'b': 2, 'c': 3, 'e': None})
        >>> d2 = AttrDict({'b': 5, 'e': 6, 'f': 7})
        >>> find_or_none('c', (d1, d2))
        3
        >>> find_or_none('f', (d1, d2))
        7
        >>> find_or_none('b', (d1, d2))
        2
        >>> print(find_or_none('g', (d1, d2)))
        None
        >>> find_or_none('e', (d1, d2))
        6

    i   N(   R   t   Nonet   find_or_noneR	   t
   IndexError(   t   keyt   search_mapsR   t
   _map_indext   attr(    (    s7   lib/python2.7/site-packages/conda/_vendor/auxlib/ish.pyR      s    (c         C` s   y> t  | | |  |  } | d  k	 r) | St |  | d |  SWn> t k
 re t |  | | | d  St k
 r~ t    n Xd  S(   Ni   (   R   R   t   find_or_raiseR	   R   (   R   R   R   R   R   (    (    s7   lib/python2.7/site-packages/conda/_vendor/auxlib/ish.pyR   :   s    (N(    (    (    (   t
   __future__R    R   R   t   loggingR   t   textwrapR   t   __name__t   logR   R   R   R   (    (    (    s7   lib/python2.7/site-packages/conda/_vendor/auxlib/ish.pyt   <module>   s   	