관리-도구
편집 파일: dbgovernor_config.cpython-311.pyc
� �Cg� � � � d dl Z d dlmZmZmZ d dlmZ dd�Zedk r_ e j � � Z e � dd d d�� � e � � � Z e j r ed� � � dS ed� � � dS dS )� N)�minidom�DOMException�NotFoundErr)� ExpatError�!/etc/container/mysql-governor.xmlTc �� � t j | � � } |r0|� d� � d � dd� � n.|� d� � d � d� � t | dd�� � 5 }|� |� � ddd� � dS # 1 swxY w Y dS # t t t f$ r Y dS w xY w# t t t f$ r Y dS w xY w) zI :param str config_path: :param bool save_uid: :return: � statisticr �save_uid�On�wzutf-8)�encodingN) r �parse�getElementsByTagName�setAttribute�removeAttribute�open�writexmlr � IndexError�KeyError�IOErrorr r )�config_pathr �governor_config�config_files ��/builddir/build/BUILDROOT/lve-stats-4.2.10-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/utils/dbmigrator/dbgovernor_config.py�set_governor_save_uidr s\ � �6�!�-��4�4�� 6�� a��4�4�[�A�A�!�D�Q�Q�R\�^b�c�c�c�c��4�4�[�A�A�!�D�T�T�U_�`�`�`� �k�3��9�9�9� 6�[��(�(��5�5�5� 6� 6� 6� 6� 6� 6� 6� 6� 6� 6� 6� 6���� 6� 6� 6� 6� 6� 6�� �Z��2� � � ��D�D� ����� �Z��.� � � ���� ���s5 �C �A B9 � B,�,B0�3B0�9C�C�C2�1C2�__main__z --save_uid� store_truer F)�action�dest�default)r )r T)�argparse�xml.domr r r �xml.parsers.expatr r �__name__�ArgumentParser�parser�add_argument� parse_args�optsr � � r �<module>r, s� �� ���� 6� 6� 6� 6� 6� 6� 6� 6� 6� 6� (� (� (� (� (� (�6� 6� 6� 6�0 �z��� $�X� $� &� &�F� ����� �� � � � � �����D��}� .���t�,�,�,�,�,�,���u�-�-�-�-�-�-� �r+