řr r d dl Z d dlZ ej d Z e j d Z G d de ZdS ) NTzcloudlinux-summaryc e Zd ZdZddddgdgddiddiddig d Zdej def ded z d e e ef fdZdej def ded eded z d d f dZd S )StatisticsDictz> Special class to store all metrics before sending it z-42ig E) strintfloatstr_listint_listint_dict float_dictstr_dict rpm_stat_listfunc.log_messageNreturnc | }n6# t $ r)}|rt d|| Y d}~dS d}~ww xY wd|fS )a Method for catching any exceptions while calling the passed function, logging them and returning None and success flag if an exception has been encountered. Returns a formatted result of the function call otherwise. :param func: function that should be called :param log_message: if given, it will be logged as exception message. z%s. Exception: "%s"N)FNT) Exceptionlogger exception)selfr r resulterrs py/clsummary/storage.py evaluate_safezStatisticsDict.evaluate_safe) sw TVVFF ) ;;;;; V|s A ;A type_of_resultname_of_metricc ` | || \ }}|s | j | }|| |<