| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/uaclient/daemon/__pycache__/ |
Upload File : |
U
UٵgU � @ s� d dl Z d dlZd dlZd dlmZmZmZmZmZ d dl mZ
d dlmZm
Z
d dlmZ d dlmZ d dlmZ d dlmZmZ e�e�e��Zd d d
ddd
ddddddddddddgZdZeed�dd�Zed�dd�Z edd�dd�Z!dS )� N)�
exceptions�lock�messages�system�util)r )�FullAutoAttachOptions�full_auto_attach)�_is_attached)�UAConfig)�AUTO_ATTACH_STATUS_MOTD_FILE)�notices�state_filesi� i i i i@8 i�p i�Q i � i�� i F i�� z./run/ubuntu-advantage/flags/auto-attach-failed)�e�returnc C s� t | tj�rtjj| jd�S t | tj�r.tjS t | tj �rJtj
j| jd�S t | tj�rftj
j| jd�S t | tj�r�tjj| jd�d�t| j�� S t | tj�r�d�| j�S tjd| d� t| �p�tjS d S ) N)Zdetail)�pid)� error_msg)�urlz: "{}"z"{}"zUnexpected exception)�exc_info)�
isinstance�api_exceptionsZInvalidProImager Z$RETRY_ERROR_DETAIL_INVALID_PRO_IMAGE�formatr ZNonAutoAttachImageErrorZ(RETRY_ERROR_DETAIL_NON_AUTO_ATTACH_IMAGE�
LockHeldErrorZRETRY_ERROR_DETAIL_LOCK_HELDr ZContractAPIErrorZ%RETRY_ERROR_DETAIL_CONTRACT_API_ERRORZbodyZConnectivityErrorZ RETRY_ERROR_DETAIL_URL_ERROR_URLr �strZcause_errorZUbuntuProError�msg�LOG�error�
UNKNOWN_ERROR)r � r �C/usr/lib/python3/dist-packages/uaclient/daemon/retry_auto_attach.py�,full_auto_attach_exception_to_failure_reason) s, ����r ��cfgc C s>