%PDF- %PDF-
Direktori : /lib/python3/dist-packages/UpdateManager/Core/__pycache__/ |
Current File : //lib/python3/dist-packages/UpdateManager/Core/__pycache__/LivePatchSocket.cpython-312.pyc |
� 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&