3 0Q=j!@sddlZejdddZeeds(eje_ejZddlmZddlm Z ddl Z e j dde j dde _ ydd l m ZWnJek rydd lmZWn$ek rGd d d eZYnXYnXGd ddeZGdddeZyddl mZWnBek r:yddlmZWnek r4eZYnXYnXGdddeZGdddeZGdddeZGdddeZGdddeZGdddeZGdddeZGd d!d!eeZGd"d#d#eZGd$d%d%eeZGd&d'd'eZGd(d)d)eZ Gd*d+d+eeZ!Gd,d-d-eeZ"Gd.d/d/eeZ#Gd0d1d1eZ$Gd2d3d3eeZ%Gd4d5d5eZ&Gd6d7d7eZ'Gd8d9d9eZ(Gd:d;d;eZ)Gdd?d?eZ+Gd@dAdAeZ,GdBdCdCeZ-GdDdEdEeZ.GdFdGdGeZ/dS)HNzrhn-client-toolsT)Zfallbackugettext)ustr) up2dateLog) YumBaseError)Errorc@s$eZdZddZddZddZdS) PmBaseErrorcCs ||_dS)N)value)selferrmsgr #/usr/lib/python3.6/up2dateErrors.py__init__*szPmBaseError.__init__cCsttd|jj|fdS)Nzclass %s has no attribute '%s')AttributeError_ __class____name__)r namer r r __getattr__,szPmBaseError.__getattr__cCs"|dkr||jd<n ||j|<dS)Nr r )r r )__dict__)r rr r r r __setattr__.s zPmBaseError.__setattr__N)r __module__ __qualname__rrrr r r r r)src@s4eZdZdZdZddZddZddZd d Zd S) rzbase class for errorscCs2t|}tj||d|j||_tj|_dS)Nz rhn-plugin: )rrrpremsgr rZinitLoglog)r r r r r r8s zError.__init__cCs|jj|j|jS)N)rZlog_mer )r r r r __repr__>szError.__repr__cCsT|dkr|jSttdr$tj||S||jkr8|j|Sttd|jj|fdS)zG Spacewalk backend still use errmsg, let have errmsg as alias to value r rzclass %s has no attribute '%s'N) r hasattrrrrrrrr)r rr r r rBs    zError.__getattr__cCs<|dkr||jd<n$ttdr.tj|||n ||j|<dS)zG Spacewalk backend still use errmsg, let have errmsg as alias to value r r rN)rrrr)r rr r r r rPs   zError.__setattr__N) rrr__doc__rrrrrr r r r r5s rc@s eZdZdS)DebAndSuseRepoErrorN)rrrr r r r r[sr) RepoErrorc@s eZdZdS)RhnServerExceptionN)rrrr r r r r!gsr!c@seZdZdZedZdS) PasswordErrorz@Raise when the server responds with that a password is incorrectz!Password error. The message was: N)rrrrrrr r r r r"jsr"c@seZdZdZedZdS)CommunicationErrorzDIndicates a problem doing xml-rpc http communication with the serverz2Error communicating with server. The message was: N)rrrrrrr r r r r#osr#c@seZdZdZedZdS)FileNotFoundErrorzR Raise when a package or header that is requested returns a 404 error codezFile Not Found: N)rrrrrrr r r r r$tsr$c@seZdZdZedZdS) DelayErrorzO Raise when the expected response from a xml-rpc call exceeds a timeoutz+Delay error from server. The message was: N)rrrrrrr r r r r%{sr%c@seZdZddZddZdS) NoLogErrorcCst|}|j||_dS)N)rrr )r msgr r r rszNoLogError.__init__cCs|jS)N)r )r r r r rszNoLogError.__repr__N)rrrrrr r r r r&sr&c@s eZdZdS) AbuseErrorN)rrrr r r r r(sr(c@s eZdZdS)AuthenticationTicketErrorN)rrrr r r r r)sr)c@s eZdZdS)AuthenticationErrorN)rrrr r r r r*sr*c@seZdZdZedZdS)ValidationErrorz1indicates an error during server input validationz!Error validating data at server: N)rrrrrrr r r r r+sr+c@s eZdZdS)InvalidRegistrationNumberErrorN)rrrr r r r r,sr,c@s$eZdZddZddZddZdS)RegistrationDeniedErrorcCstj||jdS)N)r!rchangeExplanation)r r r r rsz RegistrationDeniedError.__init__cCs|jS)N)r )r r r r rsz RegistrationDeniedError.__repr__cCstdS)Nz CloudLinux Network Classic is not supported. To register with CloudLinux Subscription Management please run: subscription-manager register --auto-attach Get more information at www.cloudlinux.com )r)r r r r r.sz)RegistrationDeniedError.changeExplanationN)rrrrrr.r r r r r-sr-c@seZdZdZdS)NoBaseChannelErrorz/No valid base channel was found for this systemN)rrrrr r r r r/sr/c@s eZdZdS)UnknownMethodExceptionN)rrrr r r r r0sr0c@s eZdZdS)RhnUuidUniquenessErrorN)rrrr r r r r1sr1c@seZdZdZedZdS) NetworkErrorzD some generic network error occurred, e.g. connection reset by peer zNetwork error: N)rrrrrrr r r r r2sr2c@seZdZddZejZdS)SSLCertificateVerifyFailedErrorcCstj|ddS)Nz(The SSL certificate failed verification.)r r)r r r r rsz(SSLCertificateVerifyFailedError.__init__N)rrrrrrr r r r r3sr3c@s eZdZdS)SSLCertificateFileNotFoundN)rrrr r r r r4sr4c@seZdZdZdS)$AuthenticationOrAccountCreationErrora%Class that can represent different things depending on context: While logging in with an existing user it represents a username or password being incorrect. While creating a new account, it represents the username already being taken or the user not being allowed to create an account. Optimally these different things would be different exceptions, but there are single fault codes the server can return to the client that can mean more than one of them so we have no way of knowing which is actually intended. N)rrrrr r r r r5s r5c@s eZdZdS)NotEntitlingErrorN)rrrr r r r r6sr6c@s eZdZdS)UnableToCreateUserN)rrrr r r r r7sr7c@s eZdZdS)ActivationKeyUsageLimitErrorN)rrrr r r r r8sr8c@s eZdZdS)LoginMinLengthErrorN)rrrr r r r r9sr9c@s eZdZdS)PasswordMinLengthErrorN)rrrr r r r r:sr:c@s eZdZdS)PasswordMaxLengthErrorN)rrrr r r r r;sr;c@s$eZdZddZddZddZdS)InsuffMgmntEntsErrorcCstj||j|dS)N)r!rr.)r r'r r r rszInsuffMgmntEntsError.__init__cCs|jS)N)r )r r r r rszInsuffMgmntEntsError.__repr__cCs.td}d}|j|t|}|d||S)Na Your organization does not have enough Management entitlements to register this system to CloudLinux Network. Please notify your organization administrator of this error. You should be able to register this system after your organization frees existing or purchases additional entitlements. Additional entitlements may be purchased by your organization administrator by logging into CloudLinux Network and visiting A common cause of this error code is due to having mistakenly setup an Activation Key which is set as the universal default. If an activation key is set on the account as a universal default, you can disable this key and retry to avoid requiring a Management entitlement.z Explanation:)rrindexlen)r r'ZnewExplnZtermlocr r r r.s  z&InsuffMgmntEntsError.changeExplanationN)rrrrrr.r r r r r<sr<c@seZdZdZdS)InvalidRedirectionErrorz7 Raise when redirect requests could'nt return a packageN)rrrrr r r r r@sr@)0gettextZ translationtrrrZrhn.i18nrZup2date_clientrsyspathZ yum.Errorsrr ImportErrorZdnf.exceptionsr Exceptionrr r!r"r#r$r%r&r(r)r*r+r,r-r/r0r1r2r3r4r5r6r7r8r9r:r;r<r@r r r r sf    &