dbfdg 3 °Îwh+ã@sˆddlmZGdd„deƒZGdd„deƒZGdd„deƒZGdd „d eƒZGd d „d eƒZGd d „d eƒZGdd„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 rrrr rsrc@seZdZdZdS)Ú KcareErrorzwBase kernelcare exception which will be considered as expected error and the full traceback will not be shown. N)r r r Ú__doc__rrrr rsrc@s eZdZdS)ÚNotFoundN)r r r rrrr rsrc@s eZdZdS)ÚNoLibcareLicenseExceptionN)r r r rrrr rsrcs$eZdZ‡fdd„Zdd„Z‡ZS)ÚAlreadyTrialedExceptioncs0tt|ƒj||Ž|d|jdƒ…|_||_dS)NéÚT)Úsuperrr ÚindexÚcreatedÚip)rrrÚargsÚkwargs)Ú __class__rr r sz AlreadyTrialedException.__init__cCsdj|j|jƒS)Nz6The IP {0} was already used for a trial license on {1})Úformatrr)rrrr Ú__str__%szAlreadyTrialedException.__str__)r r r r rÚ __classcell__rr)rr rs rc@seZdZdd„ZdS)ÚUnableToGetLicenseExceptioncCstj|dt|ƒƒdS)Nz6Unknown Issue when getting trial license. Error code: )Ú Exceptionr Ústr)rÚcoderrr r *sz$UnableToGetLicenseException.__init__N)r r r r rrrr r)src@s eZdZdS)ÚBadSignatureExceptionN)r r r rrrr r#.sr#cs‡fdd„}|S)Ncs t|ˆƒS)N)Ú isinstance)ÚeÚstate)Úexc_listrr r3szcheck_exc..innerr)r'rr)r'r Ú check_exc2s r(N) Úpy23rr rrrrrrr#r(rrrr Ús