ó
%}Xc           @   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   s8   t  j j |  ƒ |  j p. |  j ƒ  p. |  j ƒ  |  _ d  S(   N(   t   origR    t   finalize_optionst   passwordt   _load_password_from_keyringt   _prompt_for_password(   t   self(    (    s=   /usr/lib/python2.7/dist-packages/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
   repositoryt   usernamet	   Exception(   R   R   (    (    s=   /usr/lib/python2.7/dist-packages/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(   t   getpassR   t   KeyboardInterrupt(   R   (    (    s=   /usr/lib/python2.7/dist-packages/setuptools/command/upload.pyR      s    (   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    s=   /usr/lib/python2.7/dist-packages/setuptools/command/upload.pyR       s   	
	
(   R   t   distutils.commandR    R   (    (    (    s=   /usr/lib/python2.7/dist-packages/setuptools/command/upload.pyt   <module>   s   