B
    T[,                 @   sZ   d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	 e
dZdd	 Zd
d ZdS )z+
Print the information of the current user
    )unicode_literalsN)errors)get_server_api)pprint_userzbinstar.whoamic          
   C   s`   t | j| j}y| }W n8 tjk
rR } zt| td dS d }~X Y nX t	| d S )NzAnonymous User   )
r   tokenZsiteuserr   ZUnauthorizedloggerdebuginfor   )argsZaserver_apir   err r   ]lib/python3.7/site-packages/anaconda_client-1.7.2-py3.7.egg/binstar_client/commands/whoami.pymain   s    

r   c             C   s    | j ddtd}|jtd d S )NZwhoamiz)Print the information of the current user)helpZdescription)r   )
add_parser__doc__Zset_defaultsr   )Z
subparsersZ	subparserr   r   r   r      s    r   )r   Z
__future__r   ZloggingZbinstar_clientr   Zbinstar_client.utilsr   Zbinstar_client.utils.pprintr   Z	getLoggerr	   r   r   r   r   r   r   <module>   s   
