ó
>ò†[c           @   s]   d  Z  d d l m Z m Z d d l Z d d l m Z e j d ƒ Z d „  Z	 d „  Z
 d S(   s   
Log out from binstar
iÿÿÿÿ(   t   get_server_apit   remove_tokenN(   t   errorss   binstar.logoutc         C   s†   t  |  j |  j ƒ } | j ru y | j ƒ  Wn, t j k
 rZ } t j d j | ƒ ƒ n Xt	 |  ƒ t j
 d ƒ n t j
 d ƒ d  S(   Ns:   The token that you are trying to remove may not be valid{}s   logout successfuls   You are not logged in(   R    t   tokent   sitet   remove_authenticationR   t   Unauthorizedt   loggert   debugt   formatR   t   info(   t   argst   aserver_apit   err(    (    s]   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/logout.pyt   main   s    	
c         C   s/   |  j  d d d d t ƒ} | j d t ƒ d  S(   Nt   logoutt   helps%   Log out from your Anaconda repositoryt   descriptionR   (   t
   add_parsert   __doc__t   set_defaultsR   (   t
   subparserst	   subparser(    (    s]   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/logout.pyR      s    	(   R   t   binstar_client.utilsR    R   t   loggingt   binstar_clientR   t	   getLoggerR   R   R   (    (    (    s]   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/logout.pyt   <module>   s   	