Server IP : 15.235.198.142 / Your IP : 216.73.216.84 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/netplan/__pycache__/ |
Upload File : |
� *C�e< � �D � d dl mZmZ ddlmZmZ ddlmZ G d� d� Zy)� )�Union�IO� )�ffi�lib)�_checked_lib_callc �d � e Zd Zd� Zd� Zdeeef fd�Zddefd�Z defd�Z defd �Zded efd�Zy) �Parserc �6 � t j � | _ y �N)r �netplan_parser_new�_ptr)�selfs �0/usr/lib/python3/dist-packages/netplan/parser.py�__init__zParser.__init__ s � ��*�*�,�� � c �n � t j d| j � }t j |� y )NzNetplanParser **)r �newr r �netplan_parser_clear)r �refs r �__del__zParser.__del__ s% � ��g�g�(�$�)�)�4��� � ��%r � input_filec �� � t |t � r4t t j | j |j d� � S t t j | j |j � � S �Nzutf-8) � isinstance�strr r �netplan_parser_load_yamlr �encode� netplan_parser_load_yaml_from_fd�fileno�r r s r � load_yamlzParser.load_yaml sT � ��j�#�&�$�S�%A�%A�4�9�9�j�N_�N_�`g�Nh�i�i�$�S�%I�%I�4�9�9�V`�Vg�Vg�Vi�j�jr N�rootdirc � � |r|j d� nt j }t t j | j |� S r )r r �NULLr r �"netplan_parser_load_yaml_hierarchyr )r r# �roots r �load_yaml_hierarchyzParser.load_yaml_hierarchy$ s2 � �*1�w�~�~�g�&�s�x�x�� ��!G�!G����TX�Y�Yr c �j � t t j | j |j d� � S r )r r �netplan_parser_load_keyfiler r r! s r �load_keyfilezParser.load_keyfile( s'