/
usr
/
libexec
/
kcare
/
python
/
kcarectl
/
__pycache__
/
Upload File
HOME
a ^�i� � @ s� d dl mZ G dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d d� de�ZG dd � d e�ZG dd� de�Z G dd� de�Z dd� ZdS )� )� HTTPErrorc @ s e Zd Zddd�ZdS )�SafeExceptionWrapperNc C s || _ || _|| _d S �N)�inner�etype�details)�selfr r r � r �,/usr/libexec/kcare/python/kcarectl/errors.py�__init__ s zSafeExceptionWrapper.__init__)NN)�__name__� __module__�__qualname__r r r r r r s r c s$ e Zd ZdZdZ� fdd�Z� ZS )� KcareErrora4 Base kernelcare exception which will be considered as expected error and the full traceback will not be shown. Subclasses may set a class-level ``status`` to provide a short, fixed label for error reporting. Individual raise sites can override it per-instance via the ``status`` kwarg. � c s2 |� dd �}|d urt|�| _tt| �j|� d S )N�status)�pop�strr �superr r )r �args�kwargsr �� __class__r r r s zKcareError.__init__)r r r �__doc__r r � __classcell__r r r r r s r c @ s e Zd ZdS )�NotFoundN)r r r r r r r r ! s r c @ s e Zd ZdZdS )�NoLibcareLicenseExceptionzno libcare licenseN�r r r r r r r r r % s r c @ s e Zd ZdZdS )�CapabilitiesMismatchzcapabilities mismatchNr r r r r r ) s r c s( e Zd ZdZ� fdd�Zdd� Z� ZS )�AlreadyTrialedExceptionzalready trialedc s4 t t| �j|i |�� |d|�d�� | _|| _d S )N� �T)r r r �index�created�ip)r r$ r# r r r r r r 0 s z AlreadyTrialedException.__init__c C s d� | j| j�S )Nz6The IP {0} was already used for a trial license on {1})�formatr$ r# )r r r r �__str__5 s zAlreadyTrialedException.__str__)r r r r r r&