SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > site-packages > raven > utils


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/utils

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
serializer Directory - -
__init__.py File 3218 bytes April 17 2025 13:10:58.
basic.py File 2443 bytes April 17 2025 13:10:58.
compat.py File 5676 bytes April 17 2025 13:10:58.
conf.py File 2343 bytes April 17 2025 13:10:58.
encoding.py File 3303 bytes April 17 2025 13:10:58.
http.py File 2000 bytes April 17 2025 13:10:58.
imports.py File 404 bytes April 17 2025 13:10:58.
json.py File 2977 bytes April 17 2025 13:10:58.
ssl_match_hostname.py File 3598 bytes April 17 2025 13:10:58.
stacks.py File 10036 bytes April 17 2025 13:10:58.
testutils.py File 697 bytes April 17 2025 13:10:58.
transaction.py File 1088 bytes April 17 2025 13:10:58.
urlparse.py File 476 bytes April 17 2025 13:10:58.
wsgi.py File 3731 bytes April 17 2025 13:10:58.

Reading File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/utils/transaction.py

from __future__ import absolute_import

from threading import local


class TransactionContext(object):
    def __init__(self, stack, context):
        self.stack = stack
        self.context = context

    def __enter__(self):
        self.stack.push(self.context)
        return self

    def __exit__(self, *exc_info):
        self.stack.pop(self.context)


class TransactionStack(local):
    def __init__(self):
        self.stack = []

    def __len__(self):
        return len(self.stack)

    def __iter__(self):
        return iter(self.stack)

    def __call__(self, context):
        return TransactionContext(self, context)

    def clear(self):
        self.stack = []

    def peek(self):
        try:
            return self.stack[-1]
        except IndexError:
            return None

    def push(self, context):
        self.stack.append(context)
        return context

    def pop(self, context=None):
        if context is None:
            return self.stack.pop()

        while self.stack:
            if self.stack.pop() is context:
                return context

SILENT KILLER Tool