403Webshell
Server IP : 37.9.174.138  /  Your IP : 216.73.216.117
Web Server : Apache
System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64
User : ftpuser ( 1001)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/psutils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/psutils/warnings.py
"""
PSUtils warning and error routines.
Copyright (c) Reuben Thomas 2023.
Released under the GPL version 3, or (at your option) any later version.
"""

import sys
from warnings import warn
from typing import Callable, Optional, Union, Type, NoReturn, TextIO


# Error messages
def simple_warning(prog: str) -> Callable[..., None]:
    def _warning(  # pylint: disable=too-many-arguments
        message: Union[Warning, str],
        category: Type[Warning],  # pylint: disable=unused-argument
        filename: str,  # pylint: disable=unused-argument
        lineno: int,  # pylint: disable=unused-argument
        file: Optional[TextIO] = sys.stderr,
        line: Optional[str] = None,  # pylint: disable=unused-argument
    ) -> None:
        print(f"\n{prog}: {message}", file=file or sys.stderr)

    return _warning


def die(msg: str, code: Optional[int] = 1) -> NoReturn:
    warn(msg)
    sys.exit(code)

Youez - 2016 - github.com/yon3zu
LinuXploit