403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.128.201.40
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/utils/pkg_resources.py
from typing import Dict, Iterable, List

from pip._vendor.pkg_resources import yield_lines


class DictMetadata:
    """IMetadataProvider that reads metadata files from a dictionary."""

    def __init__(self, metadata: Dict[str, bytes]) -> None:
        self._metadata = metadata

    def has_metadata(self, name: str) -> bool:
        return name in self._metadata

    def get_metadata(self, name: str) -> str:
        try:
            return self._metadata[name].decode()
        except UnicodeDecodeError as e:
            # Mirrors handling done in pkg_resources.NullProvider.
            e.reason += f" in {name} file"
            raise

    def get_metadata_lines(self, name: str) -> Iterable[str]:
        return yield_lines(self.get_metadata(name))

    def metadata_isdir(self, name: str) -> bool:
        return False

    def metadata_listdir(self, name: str) -> List[str]:
        return []

    def run_script(self, script_name: str, namespace: str) -> None:
        pass

Youez - 2016 - github.com/yon3zu
LinuXploit