관리-도구
편집 파일: server_id.cpython-311.pyc
� �Cg� � � � d dl mZ d dlmZmZ d dlmZmZ d dlm Z m Z d dlmZ d dl mZ d dlmZ d dlmZ G d � d e� � ZdS )� )�uuid4)�change_settings�load)�config� lveinfolib)�history�history_x60)�history_gov)�incident)�servers)�userc �N � e Zd ZdZdZdZdd�Zd� Zd� Zd� Z d � Z dd�Zd� Zd � Z dS )�UpdateOrCreateServerIDzeChange old-style server ID 'localhost' to auto-generated uuid User can set his own server ID )� localhost� Nc �: � || _ |pt j | _ dS )zi :type engine: sqlalchemy.engine.base.Engine :type config_path: Union[str, None] N)�enginer �GLOBAL_CONFIG_LOCATION�config_path)�selfr r s ��/builddir/build/BUILDROOT/lve-stats-4.2.10-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/server_id.py�__init__zUpdateOrCreateServerID.__init__ s! � � ���&�G�&�*G����� c � � t | j �� � }|� d� � S # t $ r}t d|� �� � Y d}~dS d}~ww xY w)�* :rtype: Union[None, str] )�path� server_id�Error: N)r r �get� Exception�print)r �cfg�es r �_get_current_server_id_cfgz1UpdateOrCreateServerID._get_current_server_id_cfg"