ó
>ň[c           @   ss   d  Z  d d l m Z m Z m Z d d l m Z d d l m Z d d l	 Z	 e	 j
 d  Z d   Z d   Z d S(	   sn   
Remove an object from your Anaconda repository.

example::

    anaconda remove sean/meta/1.2.0/meta.tar.gz

i˙˙˙˙(   t   get_server_apit   parse_specst
   bool_input(   t   RawTextHelpFormatter(   t   errorsNs   binstar.removec         C   s   t  |  j |  j  } x|  j D]y} y7| j r d | f } |  j sV t | t  r{ | j | j	 | j
 | j | j  q[t j d |  nĚ | j rđ d | f } |  j s˝ t | t  rÜ | j | j	 | j
 | j  q[t j d |  nk | j rKd | f } |  j st | t  r7| j | j	 | j
  q[t j d |  n t j d |  Wq t j k
 r|  j rt j d d t q q  q Xq Wd  S(	   Ns)   Are you sure you want to remove file %s ?s   Not removing file %ssR   Are you sure you want to remove the package release %s ? (and all files under it?)s   Not removing release %ssH   Are you sure you want to remove the package %s ? (and all data with it?)s!   Invalid package specification: %st    t   exc_info(   R    t   tokent   sitet   specst	   _basenamet   forceR   t   Falset   remove_distt   usert   packaget   versiont   basenamet   loggert   warningt   _versiont   remove_releaset   _packaget   remove_packaget   errorR   t   NotFoundt   True(   t   argst   aserver_apit   spect   msg(    (    s]   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/remove.pyt   main   s0    	%			c         C   sp   |  j  d d d d t d t } | j d d d d t d	 d
 | j d d d d d d | j d t  d  S(   Nt   removet   helpsú   Remove an object from your Anaconda repository. Must refer to the formal package name as it appears in the URL of the package. Also use anaconda show <USERNAME> to see list of package names. Example: anaconda remove continuumio/empty-example-notebookt   descriptiont   formatter_classR	   s>   Package written as <user>[/<package>[/<version>[/<filename>]]]t   typet   nargst   +s   -fs   --forces   Do not prompt removalt   actiont
   store_trueR   (   t
   add_parsert   __doc__R   t   add_argumentR   t   set_defaultsR   (   t
   subparserst   parser(    (    s]   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/remove.pyR)   5   s    (   R*   t   binstar_client.utilsR    R   R   t   argparseR   t   binstar_clientR   t   loggingt	   getLoggerR   R   R)   (    (    (    s]   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/remove.pyt   <module>   s   	#