ó
Aa¢Rc           @   s›   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l m Z e j Z d „  Z e Z	 e	 d ƒ e	 d ƒ d d d „  ƒ  YZ
 d S(	   iÿÿÿÿN(   t   PIPEc         C   s   |  S(   N(    (   t   e(    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyt   dummy!   s    s;   Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>s:   Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>t   AptAuthc           B   sA   e  Z d  d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   t   /c      
   C   sÿ   d g |  _  |  j  d d d d d d t j j | d ƒ g |  _ t j ƒ  |  _ |  j d	 t j j |  j d
 ƒ g 7_ |  j d t j j |  j d ƒ g 7_ |  j d d d g |  _ |  j d d d d g |  _	 |  j d d d g |  _
 t j |  j ƒ d  S(   Ns   /usr/bin/gpgs   --no-optionss   --no-default-keyrings   --no-auto-check-trustdbs   --trust-modelt   alwayss	   --keyrings   etc/apt/trusted.gpgs   --secret-keyrings   secring.gpgs   --trustdb-names   trustdb.gpgs   --with-colonss   --batchs   --list-keyss   --quiets   --delete-keys   --yess   --import(   t   gpgt   ost   patht   joint   base_optt   tempfilet   mkdtempt   tmpdirt   list_optt   rm_optt   add_optt   atexitt   registert   _cleanup_tmpdir(   t   selft   rootdir(    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyt   __init__)   s.    

			c         C   s   t  j |  j ƒ d  S(   N(   t   shutilt   rmtreeR   (   R   (    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyR   C   s    c         C   s”   g  } t  j |  j d t ƒj } xl | j ƒ  D]^ } | j d ƒ } | d d k r. | d } | j d | d d | d	 t | ƒ f ƒ q. q. W| S(
   Nt   stdoutt   :i    t   pubi	   s   %s %s
%si   iøÿÿÿi   (	   t
   subprocesst   PopenR   R    R   t	   readlinest   splitt   appendt   _(   R   t   rest   pt   linet   fieldst   name(    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyt   listF   s    
3c         C   s6   |  j  } | j | ƒ t j | ƒ } | j ƒ  d k S(   Ni    (   R   R    R   R   t   wait(   R   t   filenamet   cmdR#   (    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyt   addQ   s    
c         C   s+   d d g } t  j | ƒ } | j ƒ  d k S(   Ns   /usr/bin/apt-keyt   updatei    (   R   R   R(   (   R   R*   R#   (    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyR,   X   s    c         C   s6   |  j  } | j | ƒ t j | ƒ } | j ƒ  d k S(   Ni    (   R   R    R   R   R(   (   R   t   keyR*   R#   (    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyt   rm]   s    
(   t   __name__t
   __module__R   R   R'   R+   R,   R.   (    (    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyR   (   s   				(    (   R   t   gettextR   R   R   R   R    R!   R   t   N_R   (    (    (    s>   /usr/lib/python2.7/dist-packages/softwareproperties/AptAuth.pyt   <module>   s   		

