AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/__pycache__/storage.cpython-311.pyc |
� �ug� � �r � d dl Z d dlZ ej d� � Z e j d� � Z G d� de� � ZdS )� N�Tzcloudlinux-summaryc � � e Zd ZdZddddgdgddiddiddig d� Zdej def ded z d e e ef fd�Zdej def ded eded z d d f d�Zd S )�StatisticsDictz> Special class to store all metrics before sending it z-42i���g E�) �str�int�float�str_list�int_list�int_dict� float_dict�str_dict� rpm_stat_list�func.�log_messageN�returnc � � |� � }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)� Exception�logger� exception)�selfr r �result�errs �H/opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/storage.py� evaluate_safezStatisticsDict.evaluate_safe) sw � � ��T�V�V�F�F��� � � �� �� � �)���� � � �;�;�;�;�;����� ���� �V�|�s � � A �;�A �type_of_result�name_of_metricc �` � | � ||� � \ }}|s | j | }|| |<