Jump to >

reviewboard.scmtools.errors

exception SCMError(msg)[source]

Bases: Exception

__init__(msg)[source]
exception ChangeSetError(msg)[source]

Bases: reviewboard.scmtools.errors.SCMError

__annotations__ = {}
exception InvalidChangeNumberError[source]

Bases: reviewboard.scmtools.errors.ChangeSetError

__init__()[source]
__annotations__ = {}
exception ChangeNumberInUseError(review_request=None)[source]

Bases: reviewboard.scmtools.errors.ChangeSetError

__init__(review_request=None)[source]
__annotations__ = {}
exception EmptyChangeSetError(changenum)[source]

Bases: reviewboard.scmtools.errors.ChangeSetError

__init__(changenum)[source]
__annotations__ = {}
exception InvalidRevisionFormatError(path, revision, detail=None)[source]

Bases: reviewboard.scmtools.errors.SCMError

Indicates that a revision isn’t in a recognizable format.

__init__(path, revision, detail=None)[source]

Initialize the exception.

Parameters
  • path (bytes or unicode) – The path the revision was for.

  • revision (bytes or unicode) – The revision that was invalid.

  • detail (unicode, optional) – Additional detail to display after the standard error message.

__annotations__ = {}
exception FileNotFoundError(path, revision=None, detail=None, base_commit_id=None, context=None)[source]

Bases: reviewboard.scmtools.errors.SCMError

An error indicating a file was not found in a repository.

base_commit_id

The optional ID of the base commit the file and revision belonged to.

Type

unicode

context

Extra context used to help look up the file.

New in version 4.0.5.

Type

reviewboard.scmtools.core.FileLookupContext, optional

detail

Additional details for the error message.

Type

unicode

path

The path in the repository.

Type

unicode

revision

The revision in the repository.

Type

reviewboard.scmtools.core.Revision or unicode

__init__(path, revision=None, detail=None, base_commit_id=None, context=None)[source]

Initialize the error.

Parameters
__annotations__ = {}
exception RepositoryNotFoundError(msg=None, form_field_id=None)[source]

Bases: reviewboard.scmtools.errors.SCMError

An error indicating that a given path is not a valid repository.

Changed in version 4.0.11: Added form_field_id and an equivalent argument to the constructor.

form_field_id

The ID of the form field that this error corresponds to.

This may be None if this error isn’t about a specific field.

New in version 4.0.11.

Type

unicode

__init__(msg=None, form_field_id=None)[source]

Initialize the error.

Changed in version 4.0.11: This now takes optional msg and form_field_id parameters.

Parameters
  • msg (unicode, optional) – The optional custom message to display.

  • form_field_id (unicode, optional) – The optional ID of the form field that this error corresponds to.

__annotations__ = {}
exception AuthenticationError(allowed_types=[], msg=None, user_key=None)[source]

Bases: reviewboard.ssh.errors.SSHAuthenticationError, reviewboard.scmtools.errors.SCMError

An error representing a failed authentication for a repository.

This takes a list of authentication types that are allowed. These are dependent on the backend, but are loosely based on SSH authentication mechanisms. Primarily, we respond to “password” and “publickey”.

This may also take the user’s SSH key that was tried, if any.

__annotations__ = {}
exception UnverifiedCertificateError(certificate)[source]

Bases: reviewboard.scmtools.errors.SCMError

An error representing an unverified SSL certificate.

reviewboard.scmtools.certs.Certificate
The certificate this error pertains to.
__init__(certificate)[source]

Initialize the error message.

Parameters

certificate (reviewboard.scmtools.certs.Certificate) – The certificate this error pertains to.

__annotations__ = {}