Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/uaclient/__pycache__/ |
Upload File : |
o F��cB � @ s d dl Z d dlZd dlmZmZ d dlmZmZmZm Z m Z dZg d�ZdZ dZdZe�� Zd efd d�Z ddee d ee deee d dfdd�Z ddedeee d dfdd�Zded ee fdd�Zded ee fdd�ZG dd� d�Zd ee fdd�ZdS ) � N)�List�Optional)�apt�event_logger� exceptions�messages�systemz /usr/bin/snap)g �?g �?g @z proxy.httpzproxy.httpsu …�returnc C s dt �� v S )z(Returns whether or not snap is installed�snapd)r �get_installed_packages_names� r r �//usr/lib/python3/dist-packages/uaclient/snap.py�is_installed s r � http_proxy�https_proxy�retry_sleepsc C s� t �t�st�d�t�� dS | s|rt�tj jdd�� | r-t j dddd�| �g|d� |r?t j dddd �|�g|d� dS dS ) a Configure snap to use http and https proxies. :param http_proxy: http proxy to be used by snap. If None, it will not be configured :param https_proxy: https proxy to be used by snap. If None, it will not be configured :param retry_sleeps: Optional list of sleep lengths to apply between retries. Specifying a list of [0.5, 1] tells subp to retry twice on failure; sleeping half a second before the first retry and 1 second before the second retry. z1Skipping configure snap proxy. {} does not exist.N�snap)�service�setr z proxy.http={}�r zproxy.https={})r �which�SNAP_CMD�logging�debug�format�event�infor �SETTING_SERVICE_PROXY�subp)r r r r r r �configure_snap_proxy s( ��� ��r � protocol_typec C s>