Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
clwizard
/
config
/
__pycache__
[ HOME ]
Exec
Submit
File Name : __init__.cpython-311.opt-1.pyc
� b�iI � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ddl mZ dd lm Z mZmZ d Zdaed� � � ZdS )a, Config for wizard is not like all other our configs, it can be read and modified in multiple processes at the same time, so we should handle that situations correctly. Thus, we must set up exclusive locks for reading and writing and use contextmanager to load config on start and save right after leaving scope and in case of any errors. You can use config like this: with config.acquire_config_access() as config: options = config.get_options(module) or with config.acquire_config_access() as config: options = config.set_state(module, 'failed') � N)�contextmanager)�Optional)�Config)�MODULES_STATUS_FILE_LOCK)�UnableAcquireLockError� )�BaseConfigError�NoSuchModule�MalformedConfigError)r r r �acquire_config_accessc # �� K � t �t V � d S t t dd�� � } n7# t t f$ r#}t t |� � �� � |�d }~ww xY wt j | t j � � t � � a t V � t d u pt � � � d a t j | t j � � d S # d a t j | t j � � w xY w# t d u pt � � � d a t j | t j � � w # d a t j | t j � � w xY wxY w)N�wzutf-8)�encoding)� error_message) �_config�openr �IOError�OSErrorr �str�fcntl�flock�LOCK_EXr �save�LOCK_UN)� lock_file�es �py/clwizard/config/__init__.pyr r F s^ � � � � ��� � � ���B��1�3��I�I�I� � ���W�� B� B� B�$�3�q�6�6�:�:�:��A�����B���� �K� �5�=�)�)�)� 2��(�(��� � � � 2��t�O�-�w�|�|�~�~���G��K� �5�=�1�1�1�1�1�� �G��K� �5�=�1�1�1�1����� 2��t�O�-�w�|�|�~�~���G��K� �5�=�1�1�1�1�� �G��K� �5�=�1�1�1�1������sD �. �A"�A�A"�D �"C"