| Server IP : 159.223.102.202 / Your IP : 216.73.217.92 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/UpdateManager/Core/__pycache__/ |
Upload File : |
�
QKf � � � d dl mZ d dlZd dlZd dlZd dlZdZ G d� dej j � Z
G d� de� Z G d� d e� Z
y)
� )�GLibNz5/var/snap/canonical-livepatch/current/livepatchd.sockc � � e Zd Zd� Zd� Zy)�UHTTPConnectionc �f � t j j j | d� || _ y )N� localhost)�http�client�HTTPConnection�__init__�path)�selfr s �D/usr/lib/python3/dist-packages/UpdateManager/Core/LivePatchSocket.pyr zUHTTPConnection.__init__! s# � ����"�"�+�+�D�+�>��� � c � � t j t j t j � }|j | j � || _ y �N)�socket�AF_UNIX�SOCK_STREAM�connectr �sock)r
r s r r zUHTTPConnection.connect% s3 � ��}�}�V�^�^�V�-?�-?�@�����T�Y�Y���� r N)�__name__�
__module__�__qualname__r r � r r r r s � ��r r c �J � e Zd Zdd�Zd� Zed� � Zed� � Zed� � Zy)�LivePatchSocketNc �@ � |�t t � | _ y || _ y r )r � HOST_NAME�conn)r
� http_conns r r zLivePatchSocket.__init__, s � ���'� �2�D�I�!�D�Ir c �` � �� �� fd�}t j |�� }|j � y )Nc �� ������ �j j dd� �j j � } | j dk( �t j
| j
� � }t j |� �t j |� �t j |� �t j �����fd�� y # t $ r d�t � }Y �sw xY w)N�GETz/status?verbose=True�� Fc � �� �� ���� S r r )�active�check_state�fixes�on_done�patch_states �����r �<lambda>z=LivePatchSocket.get_status.<locals>.do_call.<locals>.<lambda>@ s �� ����[�%�H� r )r �request�getresponse�status�yaml� safe_load�read� Exception�dictr �get_check_state�get_patch_state� get_fixesr �idle_add)�r�datar&