3 g)!@sddlZejdddZeeds(eje_ejZddlZddlmZddl m Z ddl m Z dd l m Z ddlZejd dejdd e_ydd lmZWnJek rydd lmZWn$ek rGd ddeZYnXYnXGdddeZGdddeZyddlmZWnBek rZyddlmZWnek rTeZYnXYnXGdddeZGdddeZGdddeZGdddeZGdddeZGdddeZGd d!d!eZGd"d#d#eZ Gd$d%d%eZ!Gd&d'd'eZ"Gd(d)d)e!eZ#Gd*d+d+e!Z$Gd,d-d-e!eZ%Gd.d/d/e%Z&Gd0d1d1eZ'Gd2d3d3e!Z(Gd4d5d5e!Z)Gd6d7d7e!eZ*Gd8d9d9e!eZ+Gd:d;d;e!eZ,Gdd?d?e!Z.Gd@dAdAeZ/GdBdCdCeeZ0GdDdEdEeZ1GdFdGdGe%Z2GdHdIdIeZ3GdJdKdKeZ4GdLdMdMe!Z5GdNdOdOe!Z6GdPdQdQe!Z7GdRdSdSe!Z8GdTdUdUe!Z9GdVdWdWeZ:GdXdYdYe!Z;GdZd[d[e!Zs r>c@s eZdZdS)NoChannelsErrorN)rrrrrrrr@sr@c@seZdZdZedZdS) NetworkErrorzD some generic network error occurred, e.g. connection reset by peer zNetwork error: N)rrrr rrrrrrrAsrAc@seZdZddZejZdS)SSLCertificateVerifyFailedErrorcCsftj}|d}t|d}|j}|jtjjtjj|}|j rVt j |d|n t j |ddS)NZ sslCACertrznThe certificate %s is expired. Please ensure you have the correct certificate and your system time is correct.z(The SSL certificate failed verification.) rZinitUp2dateConfigopenreadcloseOpenSSLZcryptoZload_certificateZ FILETYPE_PEMZ has_expiredr"r)r Z up2dateConfigZcertFilefZbufZtempCertrrrrs  z(SSLCertificateVerifyFailedError.__init__N)rrrrr rrrrrrBsrBc@s eZdZdS)SSLCertificateFileNotFoundN)rrrrrrrrIsrIc@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)rrrr rrrrrJs rJc@s eZdZdS)NotEntitlingErrorN)rrrrrrrrKsrKc@s eZdZdS)InvalidProtocolErrorN)rrrrrrrrLsrLc@s eZdZdS)UnableToCreateUserN)rrrrrrrrMsrMc@s eZdZdS)ActivationKeyUsageLimitErrorN)rrrrrrrrNsrNc@s eZdZdS)LoginMinLengthErrorN)rrrrrrrrOsrOc@s eZdZdS)PasswordMinLengthErrorN)rrrrrrrrPsrPc@s eZdZdS)PasswordMaxLengthErrorN)rrrrrrrrQ!srQc@s$eZdZddZddZddZdS)InsuffMgmntEntsErrorcCstj||j|dS)N)r$rr8)r r(rrrr&szInsuffMgmntEntsError.__init__cCs|jS)N)r )r rrrr)szInsuffMgmntEntsError.__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(ZnewExplnZtermlocrrrr8,s  z&InsuffMgmntEntsError.changeExplanationN)rrrrrr8rrrrrR%srRc@s eZdZdS)NoSystemIdErrorN)rrrrrrrrV<srVc@seZdZdZdS)InvalidRedirectionErrorz7 Raise when redirect requests could'nt return a packageN)rrrr rrrrrW?srW)=gettextZ translationtrrrrGZrhn.i18nrZup2date_clientrrZup2date_client.pkgplatformrsyspathZ yum.Errorsrr ImportErrorZdnf.exceptionsr Exceptionr!r"r#r$r%r&r)r*r+r,r1r2r3r4r5r6r7r9r:r;r<r=r>r@rArBrIrJrKrLrMrNrOrPrQrRrVrWrrrrs~      &