/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/commons
NameSizeModeActions
__pycache__/-0755rm
argparse_utils.py115160644editdlrm
dateutil.py57620644editdlrm
decorators.py8930644editdlrm
fileutil.py11670644editdlrm
func.py162680644editdlrm
htpasswd.py22340644editdlrm
litespeed.py100000644editdlrm
logsetup.py46100644editdlrm
proctitle.py48150644editdlrm
profiler.py5750644editdlrm
progress.py10160644editdlrm
sentry.py62800644editdlrm
server_status.py13460644editdlrm
sizeutil.py26530644editdlrm
users_manager.py30420644editdlrm
__init__.py2190644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/commons/decorators.py (893B)
# coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT import signal import warnings import logging from lvestats.lib.commons import logsetup def no_sigpipe(func): def wrapper(*args, **kwargs): old_pipe_signal = signal.getsignal(signal.SIGPIPE) signal.signal(signal.SIGPIPE, signal.SIG_DFL) with warnings.catch_warnings(record=True) as recorded_warnings: retval = func(*args, **kwargs) if recorded_warnings and logsetup.FILE_LOG is not None: log = logging.getLogger("Recorded warnings") for warning in recorded_warnings: log.warning(str(warning)) signal.signal(signal.SIGPIPE, old_pipe_signal) return retval return wrapper