Sindbad~EG File Manager

Current Path : /proc/thread-self/root/opt/imunify360/venv/lib64/python3.11/site-packages/defence360agent/utils/
Upload File :
Current File : //proc/thread-self/root/opt/imunify360/venv/lib64/python3.11/site-packages/defence360agent/utils/antivirus_mode.py

import functools
import inspect

from defence360agent.contracts.config import ANTIVIRUS_MODE


def skip(f):
    @functools.wraps(f)
    async def async_wrapper(*args, **kwargs):
        return None if ANTIVIRUS_MODE else await f(*args, **kwargs)

    @functools.wraps(f)
    def wrapper(*args, **kwargs):
        return None if ANTIVIRUS_MODE else f(*args, **kwargs)

    return async_wrapper if inspect.iscoroutinefunction(f) else wrapper


enabled, disabled = ANTIVIRUS_MODE, not ANTIVIRUS_MODE

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists