Ñò
UNÚPc           @  s~  d  d k  l Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k Z d e f d „  ƒ  YZ	 d \ Z
 Z Z Z d	 d d
 „  ƒ  YZ d e e f d „  ƒ  YZ d e i j o e i d d j o
 d Z n d Z d „  Z e d j o„ e ƒ  e ƒ  Z e i e d ƒ e i ƒ  e i d ƒ Z e i d ƒ Z e i ƒ  e e i ƒ e e i ƒ e e ƒ e e ƒ n d S(   iÿÿÿÿ(   t   print_functionNt   DebconfErrorc           B  s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyR   "   s   t   lowt   mediumt   hight   criticalt   Debconfc           B  sY   e  Z d d d d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(	   c         C  sg   x! d i  ƒ  D] } |  i | ƒ q W| p t i |  _ | p t i |  _ t i t _ |  i | ƒ d  S(   Ns©   capb set reset title input beginblock endblock go get register unregister subst fset fget previous_module visible purge metaget exist version settitle info progress data(	   t   splitt
   setCommandt   syst   stdint   readt   stdoutt   writet   stderrt   setUp(   t   selft   titleR   R   t   command(    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt   __init__)   s     c         C  sq   |  i  d ƒ |  _  |  i  d  d j o t d d |  i  ƒ ‚ n |  i ƒ  i ƒ  |  _ | o |  i | ƒ n d  S(   Ni   s   2.i   s   wrong version: %s(   t   versionR   t   capbR	   t   capabilitiesR   (   R   R   (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyR   4   s    c           s    t  ˆ  ˆ ‡ ‡  f d †  ƒ d  S(   Nc            s   ˆ i  ˆ  |  | Ž S(    (   R   (   t   argst   kw(   R   R   (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt   <lambda>>   s    (   t   setattr(   R   R   (    (   R   R   s+   /usr/lib/python2.6/dist-packages/debconf.pyR
   <   s    	c   	      G  s   | i  ƒ  } |  i i d | d i t t | ƒ ƒ f ƒ |  i i ƒ  x^ t oV y |  i i ƒ  i	 d ƒ } PWqH t
 j
 o& } | i t i j o qH q¡ ‚  qH XqH Wd | j o | i d d ƒ \ } } n | d } } t | ƒ } | d j o | S| d j o† d } xx t i d | ƒ D]d } | i d ƒ oD t | ƒ d	 j o1 | d d
 j o | d 7} q„| | d 7} q | | 7} q W| St | | ƒ ‚ d  S(   Ns   %s %s
t    s   
i   t    i    s   (\\.)s   \i   t   n(   t   upperR   t   joint   mapt   strt   flusht   TrueR   t   readlinet   rstript   IOErrort   errnot   EINTRR	   t   intt   ret
   startswitht   lenR   (	   R   R   t   paramst   respt   et   statust   datat	   unescapedt   chunk(    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyR   @   s:    ,  #c         C  s!   |  i  i  d ƒ |  i  i ƒ  d  S(   Ns   STOP
(   R   R$   (   R   (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt   stopd   s    c         C  sO   y |  i  | | ƒ d SWn0 t j
 o$ } | i d d j o ‚  qK n Xd S(   Ni   i    i   (   t   inputR   R   (   R   t   priorityt   questionR1   (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt
   forceInputh   s    c         C  s   |  i  | ƒ } | d j S(   Nt   true(   t   get(   R   R9   t   result(    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt
   getBooleanq   s    c         C  s   |  i  | ƒ S(   N(   R<   (   R   R9   (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt	   getStringu   s    N(   R   R   t   NoneR   R   R
   R   R6   R:   R>   R?   (    (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyR   '   s   			$				t   DebconfCommunicatorc           B  s)   e  Z d e d  „ Z d „  Z d „  Z RS(   c      
   C  sÃ   d d | g } t  i | d t  i d t  i d t d t ƒ|  _ t t |  ƒ i d | d |  i i d	 |  i i	 ƒ | oH t
 i
 |  i i ƒ  t
 i t
 i ƒ t
 i
 |  i i ƒ  t
 i t
 i ƒ n d  S(
   Ns   debconf-communicates   -fnoninteractiveR   R   t	   close_fdst   universal_newlinesR   R   R   (   t
   subprocesst   Popent   PIPER%   t   dccommt   superRA   R   R   R   t   fcntlR   t   filenot   F_SETFDt
   FD_CLOEXECR   (   R   t   ownerR   t   cloexecR   (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyR   z   s    "c         C  sN   |  i  d  j	 o: |  i  i i ƒ  |  i  i i ƒ  |  i  i ƒ  d  |  _  n d  S(   N(   RG   R@   R   t   closeR   t   wait(   R   (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt   shutdown†   s
    c         C  s(   y |  i  ƒ  Wn t j
 o n Xd  S(   N(   RQ   t   AttributeError(   R   (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt   __del__Ž   s    N(   R   R   R@   t   FalseR   RQ   RS   (    (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyRA   y   s   	t   DEBCONF_USE_CDEBCONFR   s   /usr/lib/cdebconf/debconfs   /usr/share/debconf/frontendc           C  sE   d t  i j o1 d t  i d <t  i t t t i g t i ƒ n d  S(   Nt   DEBIAN_HAS_FRONTENDt   1t   PERL_DL_NONLAZY(   t   ost   environt   execvt   _frontEndProgramR   t
   executablet   argv(    (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt   runFrontEnd›   s    t   __main__s&   bsdmainutils/calendar_lib_is_not_emptys   less/add_mime_handlers   apt-listchanges/email-address(   R   R   R   R   (    (    t
   __future__R    R   RY   R)   R,   RD   RI   t	   ExceptionR   t   LOWt   MEDIUMt   HIGHt   CRITICALR   t   objectRA   RZ   R\   R_   R   t   dbR:   t   goR>   t   lessR?   t   aptlcR6   t   printR   R   (    (    (    s+   /usr/lib/python2.6/dist-packages/debconf.pyt   <module>   s4   R
		


