Graybyt3 Was Here
Linux cloud.locucionar.com 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
Apache
91.191.211.241
/
opt
/
imunify360
/
venv
/
lib64
/
python3.11
/
site-packages
/
sentry_sdk
/
__pycache__
[ HOME ]
Exec
Submit
File Name : attachments.cpython-311.pyc
� S�Fh � �f � d dl Z d dlZd dlmZ d dlmZmZ er d dlmZm Z m Z G d� de� � ZdS )� N)�MYPY)�Item� PayloadRef)�Optional�Union�Callablec �, � e Zd Z dd�Zd� Zd� ZdS )� AttachmentNFc � � |�|�t d� � �|�!|�t j � |� � }|�t d� � �|�t j |� � d }|| _ || _ || _ || _ || _ d S )Nz)path or raw bytes required for attachmentz#filename is required for attachmentr ) � TypeError�os�path�basename� mimetypes� guess_type�bytes�filename�content_type�add_to_transactions)�selfr r r r r s �M/opt/imunify360/venv/lib64/python3.11/site-packages/sentry_sdk/attachments.py�__init__zAttachment.__init__ s� � � �=�T�\��G�H�H�H���� 0��w�'�'��-�-�H����A�B�B�B���$�/��9�9�!�<�L��� � �� ��� �(���#6�� � � � c �� � d}| j �1t | j � � r| � � � }n| j }nt | j �� � }t |d| j | j �� � S )z-Returns an envelope item for this attachment.N)r � attachment)�payload�typer r )r �callabler r r r r )r r s r �to_envelope_itemzAttachment.to_envelope_item# su � � ���:�!��� �#�#� %��*�*�,�,����*��� �d�i�0�0�0�G�����*��]� � � � r c � � d| j �d�S )Nz<Attachment �>)r )r s r �__repr__zAttachment.__repr__5 s � � �$(�M�M�M�3�3r )NNNNF)�__name__� __module__�__qualname__r r r"