Server IP : 192.158.238.246 / Your IP : 3.17.166.43 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/clveconfig/__pycache__/ |
Upload File : |
� T�g � � � d dl Z d dlmZ d dlmZ d dlmZ ddlm Z m Z e j � e d� � Z e dz Zd a G d � de� � Zdd �Zd� Zd� ZdS )� N)�minidom)� ExpatError)�etree� )� CONFIG_DIR�acquire_lockzve.cfgz.tmp�NNc � � � e Zd Zd� fd� Z� xZS )�BadVeConfigException�Nothingc �P �� t � � � d|� �� � d S )Nz5Unable to parse /etc/container/ve.cfg file, message: )�super�__init__)�self�message� __class__s ��K/opt/cloudlinux/venv/lib64/python3.11/site-packages/clveconfig/ve_config.pyr zBadVeConfigException.__init__ s4 �� � �����M�G�M�M� � � � � � )r )�__name__� __module__�__qualname__r � __classcell__)r s @r r r s= �� � � � � � � � � � � � � � � r r Tc �d � t dk r | rt S t � � 5 t j t � � }|� d� � d }n5# t t t t f$ r}t d� � |�d}~ww xY w| r||fa ||fcddd� � S # 1 swxY w Y dS )z� Load xml config from ve.cfg 1. setup lock on file 2. read info 3. remove lock :type use_cache: bool :rtype: tuple[xml.Document, xml.Element] :raises: BadVeConfigException, LockFailedException r � lveconfigr zbad ve.cfg fileN)�PARSED_XML_CACHEr �xml�parse�VE_CFG_PATH�getElementsByTagName�OSError�IOErrorr � IndexErrorr )� use_cache�_ve_cfg� _ve_lveconfig�es r �get_xml_configr'