OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
venv
/
lib
/
python3.6
/
site-packages
/
pip
/
_internal
/
cli
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2024 06:58:42 AM
rwxr-xr-x
📄
__init__.py
132 bytes
05/09/2024 06:58:42 AM
rw-r--r--
📄
autocompletion.py
6.25 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
base_command.py
7.61 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
cmdoptions.py
27.73 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
command_context.py
760 bytes
05/09/2024 06:58:42 AM
rw-r--r--
📄
main.py
2.41 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
main_parser.py
2.55 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
parser.py
10.54 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
progress_bars.py
8.11 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
req_command.py
16.7 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
spinners.py
4.96 KB
05/09/2024 06:58:42 AM
rw-r--r--
📄
status_codes.py
116 bytes
05/09/2024 06:58:42 AM
rw-r--r--
Editing: command_context.py
Close
from contextlib import ExitStack, contextmanager from typing import ContextManager, Iterator, TypeVar _T = TypeVar("_T", covariant=True) class CommandContextMixIn: def __init__(self) -> None: super().__init__() self._in_main_context = False self._main_context = ExitStack() @contextmanager def main_context(self) -> Iterator[None]: assert not self._in_main_context self._in_main_context = True try: with self._main_context: yield finally: self._in_main_context = False def enter_context(self, context_provider: ContextManager[_T]) -> _T: assert self._in_main_context return self._main_context.enter_context(context_provider)