/usr/lib/python3/dist-packages/apt/__pycache__
Edit: /usr/lib/python3/dist-packages/apt/__pycache__/cdrom.cpython-310.pyc (2347B)
o
4fu
@ sN d Z ddlmZ ddlmZ ddlZddlZddlmZ G dd dej Z dS )z"Classes related to cdrom handling. )print_function)OptionalN)
CdromProgressc @ s: e Zd ZdZdddZd
ddZd
dd Zed
d ZdS )Cdroma; 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.
NTc C sb t j| |d u rt | _n|| _|d urt jd| |r(t jdd d S t jdd d S )NzAcquire::cdrom::mountzAPT::CDROM::NoMounttruefalse)apt_pkgr __init__r _progressconfigset)selfprogress
mountpointnomount r +/usr/lib/python3/dist-packages/apt/cdrom.pyr 1 s
zCdrom.__init__c C t j| |p| jS )zAdd cdrom to the sources.list.)r r addr
r
r r r r r A z Cdrom.addc C r )zIdentify the cdrom.)r r identr
r r r r r F r zCdrom.identc C s | }|du r
dS ttjdd }|tjd |D ]0}t|"}|D ]}| ds@||v r@ W d dS q)W d n1 sKw Y q dS )z:Check if the cdrom is already in the current sources.list.NFzDir::Etc::sourceparts*zDir::Etc::sourcelist#T)
r globr r find_dirappend find_fileopenlstrip
startswith)r
cd_idsrcfnamefobjliner r r in_sources_listK s
zCdrom.in_sources_list)NNT)N) __name__
__module____qualname____doc__r r r propertyr&