3 ฉft`ูใ@spdZddlmZddlmZmZmZddlZddl Z ddl Z Gdd„de ƒZ Gdd„de ƒZ Gd d „d e ƒZGd d „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 r r&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 )rr r sr c@s eZdZdS)ฺ CompsErrorN)rrr r r r r r2srcseZdZd‡fdd„ Z‡ZS)ฺ ConfigErrorNcs*tt|ƒj|ƒ|dk r t|ƒnd|_dS)N)r rrrฺ raw_error)rrr)rr r r8szConfigError.__init__)NN)rrr rrr r )rr r7src@s eZdZdS)ฺ DatabaseErrorN)rrr r r r r r=src@s eZdZdS)ฺ DepsolveErrorN)rrr r r r r rAsrcs0eZdZ‡fdd„Zedd„ƒZdd„Z‡ZS)ฺ DownloadErrorcstt|ƒjƒ||_dS)N)r rrฺerrmap)rr)rr r rHszDownloadError.__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 r rUszDownloadError.__str__)rrr rฺ staticmethodr$rrr r )rr rFs  rc@s eZdZdS)ฺ LockErrorN)rrr r r r r r&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 r r`szMarkingError.__init__cs&tt|ƒjƒ}|jr"|d|j7}|S)Nz: )r r'rr()rฺstring)rr r reszMarkingError.__str__)NN)rrr rrrr r )rr r']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 d t |ƒƒ|gƒ7}n"|ddjt d d t |ƒƒ|gƒ7}t t |ƒ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 r rns6    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 )rr r*lsr*c@s eZdZdS)ฺ MetadataErrorN)rrr r r r r r<•sr<c@s eZdZdS)ฺ MiscErrorN)rrr r r r r r=™sr=cseZdZd‡fdd„ Z‡ZS)ฺPackagesNotAvailableErrorNcs tt|ƒj||ƒ|pg|_dS)N)r r>rฺpackages)rrr(r?)rr r ržsz"PackagesNotAvailableError.__init__)NNN)rrr rrr r )rr r>sr>c@s eZdZdS)ฺPackageNotFoundErrorN)rrr r r r r r@ฃsr@cseZdZd‡fdd„ Z‡ZS)ฺPackagesNotInstalledErrorNcs tt|ƒj||ƒ|pg|_dS)N)r rArr?)rrr(r?)rr r rจsz"PackagesNotInstalledError.__init__)NNN)rrr rrr r )rr rAงsrAcs$eZdZ‡fdd„Zdd„Z‡ZS)ฺProcessLockErrorcstt|ƒj|ƒ||_dS)N)r rBrฺpid)rrrC)rr r rฎszProcessLockError.__init__cCst|j|jffS)zPickling support.)rBrrC)rr r r ฺ __reduce__ฒszProcessLockError.__reduce__)rrr rrDrr r )rr rBญs rBc@s eZdZdS)ฺ RepoErrorN)rrr r r r r rEทsrEc@s eZdZdS)ฺThreadLockErrorN)rrr r r r r rFผsrFc@s eZdZdS)ฺTransactionCheckErrorN)rrr r r r r rGภsrG)rZ __future__rZdnf.i18nrrrZdnf.utilr,r.r8rฺ Exceptionr rrrrrr&r'r*r<r=r>r@rArBrErFrGr r r r ฺs0 )