a ƒ¬ i^ã@s˜ddlmZGdd„deƒZGdd„deƒZGdd„deƒZGdd „d eƒZGd d „d eƒZGd d „d eƒZGdd„deƒZ Gdd„deƒZ dd„Z dS)é)Ú HTTPErrorc@seZdZddd„ZdS)ÚSafeExceptionWrapperNcCs||_||_||_dS©N)ÚinnerÚetypeÚdetails)Úselfrrr©r ú,/usr/libexec/kcare/python/kcarectl/errors.pyÚ__init__ szSafeExceptionWrapper.__init__)NN©Ú__name__Ú __module__Ú __qualname__r r r r r rsrc@seZdZdZdS)Ú KcareErrorzwBase kernelcare exception which will be considered as expected error and the full traceback will not be shown. N)r rrÚ__doc__r r r r rsrc@s eZdZdS)ÚNotFoundN©r rrr r r r rsrc@s eZdZdS)ÚNoLibcareLicenseExceptionNrr r r r rsrc@s eZdZdS)ÚCapabilitiesMismatchNrr r r r rsrcs$eZdZ‡fdd„Zdd„Z‡ZS)ÚAlreadyTrialedExceptioncs4tt|ƒj|i|¤Ž|d| d¡…|_||_dS)NéÚT)Úsuperrr ÚindexÚcreatedÚip)rrrÚargsÚkwargs©Ú __class__r r r $sz AlreadyTrialedException.__init__cCsd |j|j¡S)Nz6The IP {0} was already used for a trial license on {1})Úformatrr)rr r r Ú__str__)szAlreadyTrialedException.__str__)r rrr r"Ú __classcell__r r rr r#s rc@seZdZdd„ZdS)ÚUnableToGetLicenseExceptioncCst |dt|ƒ¡dS)Nz6Unknown Issue when getting trial license. Error code: )Ú Exceptionr Ústr)rÚcoder r r r .sz$UnableToGetLicenseException.__init__Nr r r r r r$-sr$c@s eZdZdS)ÚBadSignatureExceptionNrr r r r r(2sr(cs‡fdd„}|S)Ncs t|ˆƒSr)Ú isinstance)ÚeÚstate©Úexc_listr r r7szcheck_exc..innerr )r-rr r,r Ú check_exc6s r.N) Úpy23rr%rrrrrrr$r(r.r r r r Ús