HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/tuned/profiles/__pycache__/variables.cpython-36.pyc
3

�<�e$	�@sfddlZddlZddlZddlmZddljZddlmZddl	m
Z
mZejj
�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|_tj�|_dS)N)r�_cmd�
_lookup_re�_lookup_envrZ	Functions�
_functions)�self�r
�/usr/lib/python3.6/variables.py�__init__szVariables.__init__cCs|j|�dkr|S||S)Nr)�find)r�s�prefixr
r
r�_add_env_prefixszVariables._add_env_prefixcCstjd|�S)Nz\w+$)�re�match)r�variabler
r
r�
_check_varszVariables._check_varcCsj|dkrdSt|�}|j|�s0tjd|�dS|j|�}||jdtj|�d<||j|j	|t
j�<dS)Nz6variable definition '%s' contains unallowed charactersz
(?<!\\)\${�})�strr�log�error�expandr	r�escaper
r�constsZ
ENV_PREFIX)rr�valuer�vr
r
r�add_variables

zVariables.add_variablecCs�tjj|�stjd|�dSyLtddddd�}t|_t|��$}|j	dt
jd|j�|�WdQRXWn"t
k
r�tjd	|�dSXx<|j�D]0}x*|j|�D]}|j||j||dd
��q�Wq�WdS)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�readrZsectionsZoptionsr!�get)r�filename�config�fr�or
r
r�
add_from_file+s
,zVariables.add_from_filecCsFx@|D]8}t|�dkr.|jtjj||��q|j|||�qWdS)N�include)rr1r'r(�normpathr!)rZcfg�itemr
r
r�add_from_cfg;s
zVariables.add_from_cfgcCstjdd|jj|j|��S)Nz\\(\${\w+})z\1)r�subrZmultiple_re_replacer	)rrr
r
r�
expand_staticCszVariables.expand_staticcCs&|dkrdS|jt|��}|jj|�S)N)r7rrr)rrrr
r
rrFszVariables.expandcCs|jS)N)r
)rr
r
r�get_envNszVariables.get_envN)
�__name__�
__module__�__qualname__�__doc__rrrr!r1r5r7rr8r
r
r
rrs
r)r'rZ
tuned.logsZtunedrZtuned.constsrZtuned.utils.commandsrZtuned.utils.config_parserrrZlogsr,rrr
r
r
r�<module>s