łň
ŕ Hc           @   s6   d  d k  Z  d  d k l Z d e f d     YZ d S(   i˙˙˙˙N(   t   CdromProgresst   Cdromc           B   s;   e  Z d d e d   Z d   Z d   Z e d    Z RS(   c         C   s   t  i   |  _ | d j o t   |  _ n
 | |  _ | d j	 o t  i i d |  n | t j o t  i i d d  n t  i i d d  d S(   sü    Support for apt-cdrom like features.
            Options:
            - progress: optional progress.CdromProgress() subclass
            - mountpoint: optional alternative mountpoint
            - nomount: do not mess with mount/umount the CD
        s   Acquire::cdrom::mounts   APT::CDROM::NoMountt   truet   falseN(	   t   apt_pkgt   GetCdromt   _cdromt   NoneR    t	   _progresst   Configt   Sett   True(   t   selft   progresst
   mountpointt   nomount(    (    s-   /usr/lib/python2.5/site-packages/apt/cdrom.pyt   __init__   s    	c         C   s   |  i  i |  i  S(   s    add cdrom to the sources.list (   R   t   AddR   (   R   (    (    s-   /usr/lib/python2.5/site-packages/apt/cdrom.pyt   add   s    c         C   s.   |  i  i |  i  \ } } | o | Sn d S(   s    identify the cdrom N(   R   t   IdentR   R   (   R   t   rest   ident(    (    s-   /usr/lib/python2.5/site-packages/apt/cdrom.pyR      s    c         C   sz   |  i    } | d j o t Sn xR t t i i d   D]8 } | i   } | i d  o | | j o t	 Sq: q: Wt S(   s;    check if the cdrom is already in the current sources.list s   Dir::Etc::sourcelistt   #N(
   R   R   t   Falset   openR   R	   t   FindFilet   stript
   startswithR   (   R   t   cdidt   line(    (    s-   /usr/lib/python2.5/site-packages/apt/cdrom.pyt   inSourcesList"   s     N(	   t   __name__t
   __module__R   R   R   R   R   t   propertyR   (    (    (    s-   /usr/lib/python2.5/site-packages/apt/cdrom.pyR      s   		(   R   R   R    t   objectR   (    (    (    s-   /usr/lib/python2.5/site-packages/apt/cdrom.pys   <module>   s   