GRAYBYTE WORDPRESS FILE MANAGER1192

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/hc_python/lib/python3.12/site-packages/tblib/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/hc_python/lib/python3.12/site-packages/tblib//decorators.py
import sys
from functools import wraps

from . import Traceback


def reraise(tp, value, tb=None):
    try:
        if value is None:
            value = tp()
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value
    finally:
        value = None
        tb = None


class Error:
    def __init__(self, exc_type, exc_value, traceback):
        self.exc_type = exc_type
        self.exc_value = exc_value
        self.__traceback = Traceback(traceback)

    @property
    def traceback(self):
        return self.__traceback.as_traceback()

    def reraise(self):
        reraise(self.exc_type, self.exc_value, self.traceback)


def return_error(func, exc_type=Exception):
    @wraps(func)
    def return_exceptions_wrapper(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except exc_type:
            return Error(*sys.exc_info())

    return return_exceptions_wrapper


returns_error = return_errors = returns_errors = return_error  # cause I make too many typos


@return_error
def apply_with_return_error(args):
    """
    args is a tuple where the first argument is a callable.

    eg::

        apply_with_return_error((func, 1, 2, 3)) - this will call func(1, 2, 3)

    """
    return args[0](*args[1:])

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 23 2025 08:31:29
root / root
0755
__pycache__
--
April 04 2025 08:00:20
root / root
0755
__init__.py
7.482 KB
April 04 2025 08:00:20
root / root
0644
decorators.py
1.265 KB
April 04 2025 08:00:20
root / root
0644
pickling_support.py
4.313 KB
April 04 2025 08:00:20
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF