ó
>ò†[c           @  s„   d  Z  d d l m Z m Z d d l m Z d d l Z d d l Z d d l Z e j	 d ƒ Z
 e d „ Z e d „ Z d „  Z d S(	   u+   
Manage your Anaconda repository channels.
iÿÿÿÿ(   t   unicode_literalst   print_function(   t   get_server_apiNu   binstar.channelc   	      C  s  t  |  j |  j ƒ } |  j r* |  j } n | j ƒ  } | d } | rV t j d ƒ n  |  j r¥ | j |  j d | |  j d ƒ t j	 d j
 | t |  j ƒ Œ ƒ nØ|  j rà | j |  j | ƒ t j	 d j
 | |  j ƒ ƒ n|  j rvt j	 d j
 | j ƒ  ƒ ƒ xu| j | ƒ j ƒ  D]T \ } } t | t ƒ rJt j	 d | ƒ qt j	 d | | d	 rgd
 n d ƒ qWn|  j rò| j |  j | ƒ } t j	 d j
 | j ƒ  |  j | d	 r¿d
 n d ƒ ƒ x± | d D] } t j	 d | ƒ qÔWn‹ |  j r3| j |  j | ƒ t j	 d j
 | j ƒ  |  j ƒ ƒ nJ |  j rt| j |  j | ƒ t j	 d j
 | j ƒ  |  j ƒ ƒ n	 t ƒ  ‚ d  S(   Nu   loginu/   channel command is deprecated in favor of labeli    i   u   Copied {} {} to {}u   Removed {} {}u   {}su    + %s u	   is_lockedu   [locked]u    u   {} {} {}u   filesu     + %(full_name)su   {} {} is now lockedu   {} {} is now unlocked(   R   t   tokent   sitet   organizationt   usert   loggert   warningt   copyt   copy_channelt   infot   formatt   tuplet   removet   remove_channelt   listt   titlet   list_channelst   itemst
   isinstancet   intt   showt   show_channelt   lockt   lock_channelt   unlockt   unlock_channelt   NotImplementedError(	   t   argst   namet
   deprecatedt   aserver_apit   ownert   current_usert   channelR   t   f(    (    s^   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/channel.pyt   main   sD    	
	!%		",			%	%c         C  s  d } | r d } n  |  j  | d d j | | ƒ d t j d t ƒ} | j d d d d	 j | ƒ ƒ| j d
 t ƒ } | j d d d d | j ƒ  ƒ| j d d d d d j | | ƒ ƒ| j d d | j ƒ  d d j | | ƒ ƒ| j d d | j ƒ  d d j | | ƒ ƒ| j d d | j ƒ  d d j | | ƒ ƒ| j d d | j ƒ  d d j | | ƒ ƒ| j	 d t
 j t d | d | ƒƒ d  S(   Nu    u    [DEPRECATED in favor of label] 
t   helpu%   {}Manage your Anaconda repository {}st   formatter_classt   descriptionu   -ou   --organizationu   Manage an organizations {}st   requiredu   --copyt   nargsi   t   metavaru   --listt   actionu
   store_trueu   {}list all {}s for a useru   --showu   {}Show all of the files in a {}u   --locku   {}Lock a {}u   --unlocku   {}Unlock a {}u   --removeu   {}Remove a {}R%   R   R   (   t
   add_parserR   t   argparset   RawDescriptionHelpFormattert   __doc__t   add_argumentt   add_mutually_exclusive_groupt   Truet   uppert   set_defaultst	   functoolst   partialR%   (   t
   subparsersR   R   t   deprecated_warnt	   subparsert   group(    (    s^   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/channel.pyt   _add_parser<   sB    			c         C  s*   t  |  d d ƒt  |  d d d t ƒd  S(   NR   u   labelu   channelR   (   R<   R3   (   R8   (    (    s^   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/channel.pyR-   g   s    (   R0   t
   __future__R    R   t   binstar_client.utilsR   R6   t   loggingR.   t	   getLoggerR   t   FalseR%   R<   R-   (    (    (    s^   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/channel.pyt   <module>   s   -+