ó
€¾^Yc           @   s9   d  d l  Z  d  d l m Z d e j f d „  ƒ  YZ d S(   iÿÿÿÿN(   t   uploadR    c           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   sa   
    Override default upload behavior to obtain password
    in a variety of different ways.
    c         C   sP   t  j j |  ƒ |  j p" t j ƒ  |  _ |  j pF |  j ƒ  pF |  j ƒ  |  _ d  S(   N(	   t   origR    t   finalize_optionst   usernamet   getpasst   getusert   passwordt   _load_password_from_keyringt   _prompt_for_password(   t   self(    (    s=   /tmp/pip-build-LNwBEI/setuptools/setuptools/command/upload.pyR      s    		c         C   s>   y& t  d ƒ } | j |  j |  j ƒ SWn t k
 r9 n Xd S(   sM   
        Attempt to load password from keyring. Suppress Exceptions.
        t   keyringN(   t
   __import__t   get_passwordt
   repositoryR   t	   Exception(   R	   R
   (    (    s=   /tmp/pip-build-LNwBEI/setuptools/setuptools/command/upload.pyR      s
    c         C   s,   y t  j  ƒ  SWn t t f k
 r' n Xd S(   sH   
        Prompt for a password on the tty. Suppress Exceptions.
        N(   R   R   t   KeyboardInterrupt(   R	   (    (    s=   /tmp/pip-build-LNwBEI/setuptools/setuptools/command/upload.pyR   #   s    (   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    s=   /tmp/pip-build-LNwBEI/setuptools/setuptools/command/upload.pyR       s   		
(   R   t   distutils.commandR    R   (    (    (    s=   /tmp/pip-build-LNwBEI/setuptools/setuptools/command/upload.pyt   <module>   s   