U
    8ìYc’  ã                   @   sP   d dl mZ G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd	„ d	eƒZd
S )é    )ÚENOENTc                       s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚInvalidArchiveErrorz(Raised when libarchive can't open a filec                    s&   d||f }t | _tt| ƒ |¡ d S )Nz}Error with archive %s.  You probably need to delete and re-download or re-create this file.  Message from libarchive was:

%s)r   ÚerrnoÚsuperr   Ú__init__)ÚselfÚfnÚmsgÚargsÚkw©Ú	__class__© ú@lib/python3.8/site-packages/conda_package_handling/exceptions.pyr      s
    ÿzInvalidArchiveError.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__classcell__r   r   r   r   r      s   r   c                   @   s   e Zd ZdZdS )ÚArchiveCreationErrorz,Raised when an archive fails during creationN)r   r   r   r   r   r   r   r   r      s   r   c                       s   e Zd Z‡ fdd„Z‡  ZS )ÚCaseInsensitiveFileSystemErrorc                    s&   d}t t| ƒj|f||dœ|—Ž d S )Na
  
        Cannot extract package to a case-insensitive file system. Your install
        destination does not differentiate between upper and lowercase
        characters, and this breaks things. Try installing to a location that
        is case-sensitive. Windows drives are usually the culprit here - can
        you install to a native Unix drive, or turn on case sensitivity for
        this (Windows) location?

          package location: %(package_location)s
          extract location: %(extract_location)s
        )Úpackage_locationÚextract_location)r   r   r   )r   r   r   ÚkwargsÚmessager   r   r   r      s    
ÿýüz'CaseInsensitiveFileSystemError.__init__©r   r   r   r   r   r   r   r   r   r      s   r   c                       s   e Zd Z‡ fdd„Z‡  ZS )ÚConversionErrorc                    sJ   || _ || _d}| j r d| j  }|d| j  }tt| ƒj|f|ž|Ž d S )NÚ z'Missing files in converted package: %s
z7Mismatching sizes (corruption) in converted package: %s)Úmissing_filesÚmismatching_sizesr   r   r   )r   r   r   r
   r   Úerrorsr   r   r   r   (   s    
ÿzConversionError.__init__r   r   r   r   r   r   '   s   r   N)r   r   Ú	Exceptionr   r   r   r   r   r   r   r   Ú<module>   s   	