ģō
SÏíHc        	   @   sf   d  d k  Z  d  d k Z d  d k Z d  d k Z d  d k Z d  d k Td d d     YZ d g Z d S(   iĸĸĸĸN(   t   *t	   ALCConfigc           B   sA   e  Z d    Z d   Z d   Z d d  Z d   Z d   Z RS(   c         C   s   d |  _  d  |  _ t |  _ d |  _ t |  _ t |  _ t |  _ t |  _	 d  |  _
 t |  _ d  |  _ d |  _ d |  _ d  |  _ d  S(   Nt   pageri    t   botht   newst
   changelogs(   R   R   R   (   t   frontendt   Nonet   email_addresst   Falset   verboset   quiett   show_allt   confirmt   headerst   debugt	   save_seent   apt_modet   profilet   whicht   allowed_whicht   since(   t   self(    (    s'   /usr/share/apt-listchanges/ALCConfig.pyt   __init__"   s    													c         C   s#   t  i    |  _ |  i i |  d  S(   N(   t   ConfigParsert   parsert   read(   R   t   file(    (    s'   /usr/share/apt-listchanges/ALCConfig.pyR   3   s    c         C   sē   |  i  i |  i  o x |  i  i |  i  D]z } d  } |  i  i |  i |  oE | d j o |  i  i |  i |  } q |  i  i |  i |  } n t |  | |  q, Wn d  S(   NR   t   runR   R   R
   (   s   confirmR   s   show_alls   headerss   verbose(	   R   t   has_sectionR   t   optionsR   t
   has_optiont
   getbooleant   gett   setattr(   R   t   optiont   value(    (    s'   /usr/share/apt-listchanges/ALCConfig.pyt   expose7   s     c         C   s   t  |  | |  S(   N(   t   getattr(   R   R#   t   defvalue(    (    s'   /usr/share/apt-listchanges/ALCConfig.pyR!   B   s    c         C   sG   | d j o t  i } n
 t  i } | i t d   t  i |  d  S(   Ni    s<   Usage: apt-listchanges [options] {--apt | filename.deb ...}
(   t   syst   stdoutt   stderrt   writet   _t   exit(   R   t   exitcodet   fh(    (    s'   /usr/share/apt-listchanges/ALCConfig.pyt   usageE   s
    	c         C   s  yJ t  i  | d d d d d d d d d	 d
 d d d d d g  \ } } Wn t  i j
 o d  Sn XxH | D]@ \ } } | d j o | |  _ qn | d j o t |  _ qn qn W|  i d  j o$ |  i o d |  _ qæ d |  _ n |  i   t i d |  i	  |  _	 xx| D]p\ } } | d j o |  i
 d  q| d) j o d |  _ q| d* j o | |  _	 q| d j o | |  _ q| d+ j o d |  _ q| d j o | |  _ q| d, j o d |  _ q| d- j o d |  _ q| d" j o | |  _ q| d# j oO | |  i j o | |  _ qt d$  | d% i |  i  f GHt i d  q| d& j o d |  _ qqW|  i d' j o d  |  _ n |  i d' j o d  |  _ n |  i d  j	 o< t |  d j	 o t d(  GHt i d  n d  |  _ n | S(.   Ni   s   vf:s:caht   aptR
   s	   frontend=s   email-address=R   t   allR   s
   save_seen=s   since=R   s   which=t   helps   profile=s	   --profiles   --aptt   cmdlinet   APT_LISTCHANGES_FRONTENDs   --helpi    s   -vs	   --verboses   -fs
   --frontends   --email-addresss   -cs	   --confirms   --sinces   -as   --alls   -hs	   --headerss   --save_seens   --whichs0   Unknown option %s for --which.  Allowed are: %s.s   , s   --debugt   nones/   --since=<version> expects a only path to a .deb(   s   -vs	   --verbose(   s   -fs
   --frontend(   s   -cs	   --confirm(   s   -as   --all(   s   -hs	   --headers(   t   getoptt   GetoptErrorR   R   t   TrueR   R%   t   ost   getenvR   R0   R
   R   R   R   R   R   R   R   R   R,   t   joinR(   R-   R   t   len(   R   t   argvt   optlistt   argst   optt   arg(    (    s'   /usr/share/apt-listchanges/ALCConfig.pyR7   O   sr    	 

 	N(	   t   __name__t
   __module__R   R   R%   R   R!   R0   R7   (    (    (    s'   /usr/share/apt-listchanges/ALCConfig.pyR   !   s   				
(    (   R   R7   R(   R:   t   ret   ALChacksR   t   __all__(    (    (    s'   /usr/share/apt-listchanges/ALCConfig.pys   <module>   s   
u