HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //usr/lib/python3.9/site-packages/tuned/profiles/__pycache__/variables.cpython-39.opt-1.pyc
a

,�g	�@shddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZej
��ZGdd�d�ZdS)�N)�	functions)�commands)�ConfigParser�Errorc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�	Variablesz8
	Storage and processing of variables used in profiles
	cCs"t�|_i|_i|_t��|_dS�N)r�_cmd�
_lookup_re�_lookup_envrZ
Repository�
_functions��self�r�</usr/lib/python3.9/site-packages/tuned/profiles/variables.py�__init__szVariables.__init__cCs|�|�dkr|S||S)Nr)�find)r
�s�prefixrrr�_add_env_prefixszVariables._add_env_prefixcCst�d|�S)Nz\w+$)�re�match)r
�variablerrr�
_check_varszVariables._check_varcCsj|durdSt|�}|�|�s0t�d|�dS|�|�}||jdt�|�d<||j|�	|t
j�<dS)Nz6variable definition '%s' contains unallowed charactersz
(?<!\\)\${�})�strr�log�error�expandr	r�escaper
r�constsZ
ENV_PREFIX)r
r�valuer�vrrr�add_variables

zVariables.add_variablec
Cs�tj�|�st�d|�dSz`tddddd�}t|_t|��.}|�	dt
jd|��|�Wd�n1sr0YWn"t
y�t�d	|�YdS0|��D],}|�|�D]}|�||j||dd
��q�q�dS)Nz#unable to find variables_file: '%s'�=�#TF)Z
delimitersZinline_comment_prefixesZallow_no_value�strict�[z]
z"error parsing variables_file: '%s')�raw)�os�path�existsrrrrZoptionxform�openZread_stringrZMAGIC_HEADER_NAME�readrZsections�optionsr"�get)r
�filenameZconfig�fr�orrr�
add_from_file+s
@zVariables.add_from_filecCsB|D]8}t|�dkr,|�tj�||��q|�|||�qdS)NZinclude)rr2r(r)�normpathr")r
Zcfg�itemrrr�add_from_cfg;szVariables.add_from_cfgcCst�dd|j�|j|��S)Nz\\(\${\w+})z\1)r�subrZmultiple_re_replacer	)r
r rrr�
expand_staticCszVariables.expand_staticcCs&|durdS|�t|��}|j�|�Sr)r7rrr)r
r rrrrrFszVariables.expandcCs|jSr)r
rrrr�get_envNszVariables.get_envN)
�__name__�
__module__�__qualname__�__doc__rrrr"r2r5r7rr8rrrrrs
r)r(rZ
tuned.logsZtunedZtuned.constsrZtuned.profilesrZtuned.utils.commandsrZtuned.utils.config_parserrrZlogsr.rrrrrr�<module>s