ACIL FM
Dark
Refresh
Current DIR:
/opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk
/
opt
imunify360
venv
lib
python3.11
site-packages
sentry_sdk
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
integrations
-
chmod
Open
Rename
Delete
__pycache__
-
chmod
Open
Rename
Delete
api.py
4.69 MB
chmod
View
DL
Edit
Rename
Delete
attachments.py
1.75 MB
chmod
View
DL
Edit
Rename
Delete
client.py
14.03 MB
chmod
View
DL
Edit
Rename
Delete
consts.py
3.5 MB
chmod
View
DL
Edit
Rename
Delete
debug.py
1.11 MB
chmod
View
DL
Edit
Rename
Delete
envelope.py
8.17 MB
chmod
View
DL
Edit
Rename
Delete
hub.py
21.35 MB
chmod
View
DL
Edit
Rename
Delete
py.typed
0 B
chmod
View
DL
Edit
Rename
Delete
scope.py
15.62 MB
chmod
View
DL
Edit
Rename
Delete
serializer.py
15.92 MB
chmod
View
DL
Edit
Rename
Delete
sessions.py
7.67 MB
chmod
View
DL
Edit
Rename
Delete
tracing.py
25.24 MB
chmod
View
DL
Edit
Rename
Delete
transport.py
11.48 MB
chmod
View
DL
Edit
Rename
Delete
utils.py
26.26 MB
chmod
View
DL
Edit
Rename
Delete
worker.py
3.87 MB
chmod
View
DL
Edit
Rename
Delete
_compat.py
2.3 MB
chmod
View
DL
Edit
Rename
Delete
_functools.py
2.22 MB
chmod
View
DL
Edit
Rename
Delete
_queue.py
8.21 MB
chmod
View
DL
Edit
Rename
Delete
_types.py
1.26 MB
chmod
View
DL
Edit
Rename
Delete
__init__.py
854 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/attachments.py
import os import mimetypes from sentry_sdk._types import MYPY from sentry_sdk.envelope import Item, PayloadRef if MYPY: from typing import Optional, Union, Callable class Attachment(object): def __init__( self, bytes=None, # type: Union[None, bytes, Callable[[], bytes]] filename=None, # type: Optional[str] path=None, # type: Optional[str] content_type=None, # type: Optional[str] add_to_transactions=False, # type: bool ): # type: (...) -> None if bytes is None and path is None: raise TypeError("path or raw bytes required for attachment") if filename is None and path is not None: filename = os.path.basename(path) if filename is None: raise TypeError("filename is required for attachment") if content_type is None: content_type = mimetypes.guess_type(filename)[0] self.bytes = bytes self.filename = filename self.path = path self.content_type = content_type self.add_to_transactions = add_to_transactions def to_envelope_item(self): # type: () -> Item """Returns an envelope item for this attachment.""" payload = None # type: Union[None, PayloadRef, bytes] if self.bytes is not None: if callable(self.bytes): payload = self.bytes() else: payload = self.bytes else: payload = PayloadRef(path=self.path) return Item( payload=payload, type="attachment", content_type=self.content_type, filename=self.filename, ) def __repr__(self): # type: () -> str return "<Attachment %r>" % (self.filename,)
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply