⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
cloudinit
/
__pycache__
/
View File Name :
subp.cpython-310.pyc
o }f1 @ s d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZmZm Z eeZedddgZd d ZG dd deZd e ee ee f fddZdddddddddd d e eeee ee f defddZdddZddee fddZdd Zd ddZdS )!z9Common utility functions for interacting with subprocess. N)ENOEXEC) TextIOWrapper)ListOptionalUnion SubpResultstdoutstderrc C s g }g }g }|D ]A}t |tr)|d du r|dd }n(|d | kr(|d| nt |tr<|| ds;|| n|t| q|| q|rWtd| | d| |ret dj | d|d|S ) a Ensure user-provided commands start with base_command; warn otherwise. Each command is either a list or string. Perform the following: - If the command is a list, pop the first element if it is None - If the command is a list, insert base_command as the first element if not present. - When the command is a string not starting with 'base-command', warn. Allow flexibility to provide non-base-command environment/config setup if needed. @commands: List of commands. Each command element is a list or string. @return: List of 'fixed up' commands. @raise: TypeError on invalid config item type. r N z Non-%s commands in %s config: %s zHInvalid {name} config. These commands are not a string or list: {errors})nameerrors) isinstancelistinsertstr startswithappendLOGwarningjoin TypeErrorformat)base_commandcommandswarningsr fixed_commandscommand r 0/usr/lib/python3/dist-packages/cloudinit/subp.pyprepend_base_command s@ r! c @ sZ e Zd ZdZdZ d ddZdd Z dd eee f d eee f fddZ dS )ProcessExecutionErrorzr%(description)s Command: %(cmd)s Exit code: %(exit_code)s Reason: %(reason)s Stdout: %(stdout)s Stderr: %(stderr)s-Nc C s |p| j | _|r|| _n |s|tkrd| _nd| _t|tr |n| j | _|s1|d u r-| j n|| _n| || _|sD|d u r@| j n|| _ n| || _ |pN| j | _ |rU|| _| j| | j| | j| | j| | j | | j| | j d }t| | d S )Nz(Exec format error. Missing #! in script?z'Unexpected error while running command.)descriptioncmd exit_coder r reason) empty_attrr% r$ r r intr&