3
_A·fΊ  γ               @   sΔ   G d d de 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G d
d de 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
G dd de ZG dd de ZdS )c               @   s   e Zd ZdZdS )ΪManifestParseErrorz%Failed to parse the manifest file.
  N)Ϊ__name__Ϊ
__module__Ϊ__qualname__Ϊ__doc__© r   r   ϊ7/home/qytech/356xLinux510-101server/.repo/repo/error.pyr      s   r   c               @   s   e Zd ZdZdS )ΪManifestInvalidRevisionErrorz0The revision value in a project is incorrect.
  N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ΪManifestInvalidPathErrorz8A path used in <copyfile> or <linkfile> is incorrect.
  N)r   r   r   r   r   r   r   r   r	      s   r	   c                   s(   e Zd ZdZ fddZdd Z  ZS )ΪNoManifestExceptionz(The required manifest does not exist.
  c                s   t t| j  || _|| _d S )N)Ϊsuperr
   Ϊ__init__ΪpathΪreason)Ϊselfr   r   )Ϊ	__class__r   r   r   %   s    zNoManifestException.__init__c             C   s   | j S )N)r   )r   r   r   r   Ϊ__str__*   s    zNoManifestException.__str__)r   r   r   r   r   r   Ϊ__classcell__r   r   )r   r   r
   !   s   r
   c                   s(   e Zd ZdZ fddZdd Z  ZS )ΪEditorErrorz1Unspecified error from the user's text editor.
  c                s   t t| j  || _d S )N)r   r   r   r   )r   r   )r   r   r   r   2   s    zEditorError.__init__c             C   s   | j S )N)r   )r   r   r   r   r   6   s    zEditorError.__str__)r   r   r   r   r   r   r   r   r   )r   r   r   .   s   r   c                   s(   e Zd ZdZ fddZdd Z  ZS )ΪGitErrorz'Unspecified internal error from git.
  c                s   t t| j  || _d S )N)r   r   r   Ϊcommand)r   r   )r   r   r   r   >   s    zGitError.__init__c             C   s   | j S )N)r   )r   r   r   r   r   B   s    zGitError.__str__)r   r   r   r   r   r   r   r   r   )r   r   r   :   s   r   c                   s(   e Zd ZdZ fddZdd Z  ZS )ΪUploadErrorz-A bundle upload to Gerrit did not succeed.
  c                s   t t| j  || _d S )N)r   r   r   r   )r   r   )r   r   r   r   J   s    zUploadError.__init__c             C   s   | j S )N)r   )r   r   r   r   r   N   s    zUploadError.__str__)r   r   r   r   r   r   r   r   r   )r   r   r   F   s   r   c                   s(   e Zd ZdZ fddZdd Z  ZS )ΪDownloadErrorz Cannot download a repository.
  c                s   t t| j  || _d S )N)r   r   r   r   )r   r   )r   r   r   r   V   s    zDownloadError.__init__c             C   s   | j S )N)r   )r   r   r   r   r   Z   s    zDownloadError.__str__)r   r   r   r   r   r   r   r   r   )r   r   r   R   s   r   c                   s*   e Zd ZdZd fdd	Zdd Z  ZS )ΪNoSuchProjectErrorz7A specified project does not exist in the work tree.
  Nc                s   t t| j  || _d S )N)r   r   r   Ϊname)r   r   )r   r   r   r   b   s    zNoSuchProjectError.__init__c             C   s   | j d krdS | j S )Nzin current directory)r   )r   r   r   r   r   f   s    
zNoSuchProjectError.__str__)N)r   r   r   r   r   r   r   r   r   )r   r   r   ^   s   r   c                   s*   e Zd ZdZd fdd	Zdd Z  ZS )ΪInvalidProjectGroupsErrorz?A specified project is not suitable for the specified groups
  Nc                s   t t| j  || _d S )N)r   r   r   r   )r   r   )r   r   r   r   p   s    z"InvalidProjectGroupsError.__init__c             C   s   | j d krdS | j S )Nzin current directory)r   )r   r   r   r   r   t   s    
z!InvalidProjectGroupsError.__str__)N)r   r   r   r   r   r   r   r   r   )r   r   r   l   s   r   c                   s"   e Zd ZdZd fdd	Z  ZS )ΪRepoChangedExceptionzΑThrown if 'repo sync' results in repo updating its internal
     repo or manifest repositories.  In this special case we must
     use exec to re-execute repo with the new code and manifest.
  Nc                s   t t| j  |pg | _d S )N)r   r   r   Ϊ
extra_args)r   r   )r   r   r   r      s    zRepoChangedException.__init__)N)r   r   r   r   r   r   r   r   )r   r   r   z   s   r   c               @   s   e Zd ZdZdS )Ϊ	HookErrorzxThrown if a 'repo-hook' could not be run.

  The common case is that the file wasn't present when we tried to run it.
  N)r   r   r   r   r   r   r   r   r      s   r   N)Ϊ	Exceptionr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   Ϊ<module>   s   