Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/apt/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/apt/cdrom.pyc


WRc@s[dZddlZddlZddlmZddlmZdejfdYZdS(s"Classes related to cdrom handling.iN(tAttributeDeprecatedBy(t
CdromProgresstCdromcBs_eZdZddedZddZddZedZ	e
jr]edZ
nRS(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.
    cCstjj||dkr+t|_n	||_|dk	rVtjjd|n|rrtjjddntjjdddS(NsAcquire::cdrom::mountsAPT::CDROM::NoMountttruetfalse(tapt_pkgRt__init__tNoneRt	_progresstconfigtset(tselftprogresst
mountpointtnomount((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyR/s	cCstjj||p|jS(sAdd cdrom to the sources.list.(RRtaddR(RR((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyR>scCstjj||p|jS(sIdentify the cdrom.(RRtidentR(RR((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyRBsc	Cs|j}|dkrtStjtjjdd}|jtjjdxZ|D]R}t	|>}x4|D],}|j
jd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(Rtcd_idtsrctfnametfobjtline((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pytin_sources_listFs

"R!N(t__name__t
__module__t__doc__RRRRRtpropertyR!Rt_COMPAT_0_7Rt
inSourcesList(((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyRs	(R$RRtapt.deprecationRtapt.progress.baseRR(((s-/usr/lib/python2.7/dist-packages/apt/cdrom.pyt<module>s