U eßãgóã@s*ddlZddlZddlZGdd„dƒZdS)éNc@s&eZdZdZdZddd„Zdd„ZdS) ÚNCSentrya Simple Wrapper sentry = NCSentry() After successfully inited class we can use Sentry debug system: Report to Sentry: SentryClient.capture_message("test") SentryClient.capture_exception(Exception("MyAwsomeString")) z0.19.2Nc Cs„i|_|r|}ntj tj t¡¡}tj |d¡|_| ¡t |jƒ4}|  ¡|_ t j |j f|jŽ|_t j|_t j|_W5QRXdS)Nz .sentry.conf)Ú sentry_argsÚosÚpathÚdirnameÚrealpathÚ__file__ÚjoinZ conf_pathÚconstruct_argsÚopenÚreadZdsnÚ sentry_sdkZinitZclientZcapture_messageÚcapture_exception)ÚselfZ config_dirZdir_pathZfh©rú9/opt/alt/python38/lib/python3.8/site-packages/NCSentry.pyÚ__init__s  zNCSentry.__init__c Cspz8ddl}|jjj |j¡}| d¡j|kr6d|jd<Wn2t k rj}zt   d|›¡W5d}~XYnXdS)Nrz sentry-sdkZtraces_sample_ratez Can't setup sentry default args ) Ú pkg_resourcesZexternZ packagingÚversionZVersionÚ!_NCSentry__conflict_under_versionZget_distributionZparsed_versionrÚ ExceptionÚwarningsÚwarn)rrZ_conflict_under_versionÚerrrrrr *s ÿ ÿÿzNCSentry.construct_args)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr rrrrrs r)rr rrrrrrÚs