AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/__pycache__/context.cpython-311.pyc |
� �܋f � �� � d Z ddlmZ ddlmZmZ n# e$ r ddlmZmZ Y nw xY wddlm Z ddl mZ ddlm Z ddlmZ n# e$ r ddlmZ Y nw xY w e � � Zd� Z G d � d e ee� � ZddlZdS )z� raven.context ~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. � )�absolute_import)�Mapping�Iterable)�local)�ref)� iteritems)� get_identc �Z � t t j � � S # t $ r g cY S w xY w)z7Returns all the active contexts for the current thread.)�list�_active_contexts�contexts�AttributeError� � �D/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/context.py�get_active_contextsr s= � ���$�-�.�.�.��� � � �� � � ����s � �*�*c � � e Zd ZdZdd�Zed� � � Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Zdd�Zd� Zdd�Zd� Zd� Zdd�ZdS )�Contexta' Stores context until cleared. >>> def view_handler(view_func, *args, **kwargs): >>> context = Context() >>> context.merge(tags={'key': 'value'}) >>> try: >>> return view_func(*args, **kwargs) >>> finally: >>> context.clear() Nc �� � t j � |d u p|j � � }|�t |� � }|| _ | � � � i | _ t � � | _ || _ d S �N) �raven�breadcrumbs�make_buffer�enable_breadcrumbs�weakref�_client�activate�data�set�exceptions_to_skip)�self�clientr s r �__init__zContext.__init__2 sq � ��'�3�3��d�N�7�f�7�9� 9�����V�_�_�F���� � � ������ �"%�%�%���&����r c �<