0x1949 Team - FAZEMRX - MANAGER
Edit File: retry_auto_attach.cpython-310.pyc
o �ϴfU � @ 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��Zg d �Zd Zdedefd d�Zdefdd�Z deddfdd�Z!dS )� N)� exceptions�lock�messages�system�util)r )�FullAutoAttachOptions�full_auto_attach)�_is_attached)�UAConfig)�AUTO_ATTACH_STATUS_MOTD_FILE)�notices�state_files)� r i i i i@8 �p r �Q r � � r �� r � F r 逗 r z./run/ubuntu-advantage/flags/auto-attach-failed�e�returnc C s� t | tj�rtjj| jd�S t | tj�rtjS t | tj �r%tj j| jd�S t | tj�r3tj j| jd�S t | tj�rItjj| jd�d�t| j�� S t | tj�rUd�| j�S tjd| d� t| �pbtjS ) N)�detail)�pid)� error_msg)�urlz: "{}"z"{}"zUnexpected exception)�exc_info)� isinstance�api_exceptions�InvalidProImager �$RETRY_ERROR_DETAIL_INVALID_PRO_IMAGE�formatr �NonAutoAttachImageError�(RETRY_ERROR_DETAIL_NON_AUTO_ATTACH_IMAGE� LockHeldError�RETRY_ERROR_DETAIL_LOCK_HELDr �ContractAPIError�%RETRY_ERROR_DETAIL_CONTRACT_API_ERROR�body�ConnectivityError� RETRY_ERROR_DETAIL_URL_ERROR_URLr �str�cause_error�UbuntuProError�msg�LOG�error� UNKNOWN_ERROR)r � r1 �C/usr/lib/python3/dist-packages/uaclient/daemon/retry_auto_attach.py�,full_auto_attach_exception_to_failure_reason) s, ����r3 �cfgc C s>