HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/clwizard/modules/__pycache__/__init__.cpython-37.pyc
B

����X����	@s(ddlmZddlZddlmZddlmZddlmZm	Z	ddl
mZmZddl
mZmZddlmZd	d
lmZd	dlmZd	dlmZd	d
lmZd	dlmZd	dlmZd	dlmZd	dl m!Z!edefdefdefdefdefdefde!fg�Z"ede�Z#dd�Z$dd�Z%dd�Z&d d!�Z'dS)"�)�absolute_importN)�OrderedDict)�Dict)�NoSuchModule�acquire_config_access)�ModuleStatus�
MAIN_LOG_PATH)�InstallationFailedException�UserInterventionNeededError)�setup_logger�)�WizardInstaller)�CagefsInstaller)�GovernorInstaller)�NodejsInstaller)�PhpInstaller)�PythonInstaller)�
RubyInstaller)�LsapiInstaller�cagefsZmysql_governor�nodejs�php�python�rubyZ	mod_lsapiz
wizard.runnercCsdd�t��D�S)z6Get list of supported modules on current control panelcSsi|]\}}|��r||�qS�)Zis_supported_by_control_panel)�.0�name�modulerr�py/clwizard/modules/__init__.py�
<dictcomp>/sz)get_supported_modules.<locals>.<dictcomp>)�ALL_MODULES�itemsrrrr�get_supported_modules-sr"c
Cst�d�t�dt���x�t���D]�\}}|�}t���}y|j|d�}|j|d�}Wn"t	k
rzt�d|�w&YnX|t
jkr�t�d|�w&n2|t
jkr�t�d|�w&n|t
j
kr�t�d|�w&|j|t
jd�Wd	QRXt|||d
�q&Wt�dt���t�d�d	S)
z4Install modules according to settings in status filez<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~z7> Start new modules installation in process with pid %s)�module_namez.Module %s is not set for installation, skip itz'Module %s is already installed, skip itz%Module %s has been cancelled, skip itzOModule %s requires manual installation. Skipping it and continuing installation)r#�	new_stateN)�optionsz0> Process with pid %s successfully finished workz<------------------------------------------------------------)�log�info�os�getpidr"r!rZget_module_optionsZget_module_statusrr�	INSTALLEDZ	CANCELLED�AUTO_SKIPPED�set_module_statusZ
INSTALLING�_install_module)rZinstaller_class�	installer�configr%�staterrr�run_installation5s<



r1cCs(t�d|�y|�|�Wn�tk
r`t|tjd�tjd|d|gdt|�id�d��Yn�t	k
r�t|tj
d�t�d|�Yn�tk
�r}z\t|tjd�t�d|�|j
jd	t|�d|t|�dd
�gdt|�id�d�t�|�Wdd}~XYnXt|tjd�t�d||�dS)NzInstalling module: %s)r#r$z!Installation failed for module %sz
{{ default }}r%)Zfingerprint�data)Zextraz0Automatic installation was skipped for module %szcUnknown error occurred, please, retry or contact CloudLinux support if it happens again.

Error: %s�z5Module '%s' successfully installed using options '%s')r&r'r1r	�_write_module_state_atomicrZFAILED�error�strr
r+Zwarning�	ExceptionZ
app_loggerZ	exceptionr*)rr.r%�errrrrr-Zs:r-c	Cs$t��}|j||d�WdQRXdS)N)r#r$)rr,)r#r$r/rrrr4�sr4)(Z
__future__rr(�collectionsr�typingrZclwizard.configrrZclwizard.constantsrrZclwizard.exceptionsr	r
Zclwizard.utilsr�baser
rrZgovernorrrrrrrrrrZlsapirr r&r"r1r-r4rrrr�<module>s8
%(