ó »ÉD[c@s[dZddlmZddlZddlZddlmZdejfd„ƒYZdS(s"Classes related to cdrom handling.iÿÿÿÿ(tprint_functionN(t CdromProgresstCdromcBsGeZdZdded„Zdd„Zdd„Zed„ƒZ RS(s;Support for apt-cdrom like features. This class has several optional parameters for initialisation, which may be used to influence the behaviour of the object: The optional parameter `progress` is a CdromProgress() subclass, which will ask for the correct cdrom, etc. If not specified or None, a CdromProgress() object will be used. The optional parameter `mountpoint` may be used to specify an alternative mountpoint. If the optional parameter `nomount` is True, the cdroms will not be mounted. This is the default behaviour. cCs‰tjj|ƒ|dkr+tƒ|_n ||_|dk rVtjjd|ƒn|rrtjjddƒntjjddƒdS(NsAcquire::cdrom::mountsAPT::CDROM::NoMountttruetfalse(tapt_pkgRt__init__tNoneRt _progresstconfigtset(tselftprogresst mountpointtnomount((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyR0s   cCstjj||p|jƒS(sAdd cdrom to the sources.list.(RRtaddR(R R ((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyR?scCstjj||p|jƒS(sIdentify the cdrom.(RRtidentR(R R ((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyRCsc Csµ|jƒ}|dkrtStjtjjdƒdƒ}|jtjjdƒƒxZ|D]R}t |ƒ>}x4|D],}|j ƒj dƒ rw||krwt SqwWWdQXq[WtS(s:Check if the cdrom is already in the current sources.list.sDir::Etc::sourcepartst*sDir::Etc::sourcelistt#N( RRtFalsetglobRR tfind_dirtappendt find_filetopentlstript startswithtTrue(R tcd_idtsrctfnametfobjtline((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pytin_sources_listGs    "N( t__name__t __module__t__doc__RRRRRtpropertyR!(((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyRs   (R$t __future__RRRtapt.progress.baseRR(((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyts