Your IP : 3.16.50.1


Current Path : /usr/lib/python3.6/site-packages/dnf/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/dnf/__pycache__/exceptions.cpython-36.pyc

3

�ft`��@spdZddlmZddlmZmZmZddlZddl	Z	ddl
Z
Gdd�de�ZGdd�de�Z
Gd	d
�d
e
�ZGdd�de
�ZGd
d�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZGd%d&�d&e
�ZGd'd(�d(e�ZGd)d*�d*e
�ZdS)+z
Core DNF Errors.
�)�unicode_literals)�ucd�_�P_Nc@seZdZdS)�DeprecationWarningN)�__name__�
__module__�__qualname__�r
r
� /usr/lib/python3.6/exceptions.pyrsrcs2eZdZdZd	�fdd�	Zdd�Zdd�Z�ZS)
�ErrorzTBase Error. All other Errors thrown by DNF should inherit from this.

    :api

    Ncs(tt|�j�|dkrdnt|�|_dS)N)�superr�__init__r�value)�selfr)�	__class__r
rr&szError.__init__cCsdj|j�S)Nz{})�formatr)rr
r
r�__str__*sz
Error.__str__cCst|j��S)N)rr)rr
r
r�__unicode__-szError.__unicode__)N)rrr	�__doc__rrr�
__classcell__r
r
)rrrsrc@seZdZdS)�
CompsErrorN)rrr	r
r
r
rr2srcseZdZd�fdd�	Z�ZS)�ConfigErrorNcs*tt|�j|�|dk	r t|�nd|_dS)N)r
rrr�	raw_error)rrr)rr
rr8szConfigError.__init__)NN)rrr	rrr
r
)rrr7src@seZdZdS)�
DatabaseErrorN)rrr	r
r
r
rr=src@seZdZdS)�
DepsolveErrorN)rrr	r
r
r
rrAsrcs0eZdZ�fdd�Zedd��Zdd�Z�ZS)�
DownloadErrorcstt|�j�||_dS)N)r
rr�errmap)rr)rr
rrHszDownloadError.__init__cCsPg}x@|D]8}x2||D]&}|r,d||fnd|}|j|�qWq
Wdj|�S)Nz%s: %sz%s�
)�append�join)rZ
errstrings�key�error�msgr
r
r�
errmap2strLs
zDownloadError.errmap2strcCs|j|j�S)N)r$r)rr
r
rrUszDownloadError.__str__)rrr	r�staticmethodr$rrr
r
)rrrFs	rc@seZdZdS)�	LockErrorN)rrr	r
r
r
rr&Ysr&cs*eZdZd�fdd�	Z�fdd�Z�ZS)�MarkingErrorNcs*tt|�j|�|dkrdnt|�|_dS)z&Initialize the marking error instance.N)r
r'rr�pkg_spec)rrr()rr
rr`szMarkingError.__init__cs&tt|�j�}|jr"|d|j7}|S)Nz: )r
r'rr()r�string)rr
rreszMarkingError.__str__)NN)rrr	rrrr
r
)rrr']sr'cs4eZdZffffff�fdd�	Zedd��Z�ZS)�
MarkingErrorscstd�}|r&|dtd�dj|�7}|rD|dtd�dj|�7}|rb|dtd�dj|�7}|r�|dtd�dj|�7}|r�tjj|d�}|d	tjjjkr�|ddjt	d
dt
|��|g�7}n"|ddjt	dd
t
|��|g�7}tt|�j
|�||_||_||_||_||_dS)z&Initialize the marking error instance.zProblems in request:rzmissing packages: z, zbroken packages: zmissing groups or modules: zbroken groups or modules: r�z)Modular dependency problem with Defaults:z*Modular dependency problems with Defaults:zModular dependency problem:zModular dependency problems:N)rr �dnf�utilZ_format_resolve_problems�libdnf�moduleZModulePackageContainerZ!ModuleErrorType_ERROR_IN_DEFAULTSr�lenr
r*r�no_match_group_specs�error_group_specs�no_match_pkg_specs�error_pkg_specs�module_depsolv_errors)rr1r2r3r4r5r#Zmsg_mod)rr
rrns6zMarkingErrors.__init__cCsd}tj|tdd�|jS)Nz[Attribute module_debsolv_errors is deprecated. Use module_depsolv_errors attribute instead.�)�
stacklevel)�warnings�warnrr5)rr#r
r
r�module_debsolv_errors�sz#MarkingErrors.module_debsolv_errors)rrr	r�propertyr:rr
r
)rrr*lsr*c@seZdZdS)�
MetadataErrorN)rrr	r
r
r
rr<�sr<c@seZdZdS)�	MiscErrorN)rrr	r
r
r
rr=�sr=cseZdZd�fdd�	Z�ZS)�PackagesNotAvailableErrorNcs tt|�j||�|pg|_dS)N)r
r>r�packages)rrr(r?)rr
rr�sz"PackagesNotAvailableError.__init__)NNN)rrr	rrr
r
)rrr>�sr>c@seZdZdS)�PackageNotFoundErrorN)rrr	r
r
r
rr@�sr@cseZdZd�fdd�	Z�ZS)�PackagesNotInstalledErrorNcs tt|�j||�|pg|_dS)N)r
rArr?)rrr(r?)rr
rr�sz"PackagesNotInstalledError.__init__)NNN)rrr	rrr
r
)rrrA�srAcs$eZdZ�fdd�Zdd�Z�ZS)�ProcessLockErrorcstt|�j|�||_dS)N)r
rBr�pid)rrrC)rr
rr�szProcessLockError.__init__cCst|j|jffS)zPickling support.)rBrrC)rr
r
r�
__reduce__�szProcessLockError.__reduce__)rrr	rrDrr
r
)rrrB�srBc@seZdZdS)�	RepoErrorN)rrr	r
r
r
rrE�srEc@seZdZdS)�ThreadLockErrorN)rrr	r
r
r
rrF�srFc@seZdZdS)�TransactionCheckErrorN)rrr	r
r
r
rrG�srG)rZ
__future__rZdnf.i18nrrrZdnf.utilr,r.r8r�	Exceptionrrrrrrr&r'r*r<r=r>r@rArBrErFrGr
r
r
r�<module>s0)


?>