dulwich.errors module

Dulwich-related exception classes and utility functions.

exception dulwich.errors.ApplyDeltaError(*args, **kwargs)

Bases: Exception

Indicates that applying a delta failed.

exception dulwich.errors.ChecksumMismatch(expected, got, extra=None)

Bases: Exception

A checksum didn’t match the expected contents.

exception dulwich.errors.CommitError

Bases: Exception

An error occurred while performing a commit.

exception dulwich.errors.FileFormatException

Bases: Exception

Base class for exceptions relating to reading git file formats.

exception dulwich.errors.GitProtocolError(*args, **kwargs)

Bases: Exception

Git protocol exception.

exception dulwich.errors.HangupException(stderr_lines=None)

Bases: GitProtocolError

Hangup exception.

exception dulwich.errors.HookError

Bases: Exception

An error occurred while executing a hook.

exception dulwich.errors.MissingCommitError(sha, *args, **kwargs)

Bases: Exception

Indicates that a commit was not found in the repository

exception dulwich.errors.NoIndexPresent

Bases: Exception

No index is present.

exception dulwich.errors.NotBlobError(sha, *args, **kwargs)

Bases: WrongObjectException

Indicates that the sha requested does not point to a blob.

type_name = 'blob'
exception dulwich.errors.NotCommitError(sha, *args, **kwargs)

Bases: WrongObjectException

Indicates that the sha requested does not point to a commit.

type_name = 'commit'
exception dulwich.errors.NotGitRepository(*args, **kwargs)

Bases: Exception

Indicates that no Git repository was found.

exception dulwich.errors.NotTagError(sha, *args, **kwargs)

Bases: WrongObjectException

Indicates that the sha requested does not point to a tag.

type_name = 'tag'
exception dulwich.errors.NotTreeError(sha, *args, **kwargs)

Bases: WrongObjectException

Indicates that the sha requested does not point to a tree.

type_name = 'tree'
exception dulwich.errors.ObjectFormatException

Bases: FileFormatException

Indicates an error parsing an object.

exception dulwich.errors.ObjectMissing(sha, *args, **kwargs)

Bases: Exception

Indicates that a requested object is missing.

exception dulwich.errors.PackedRefsException

Bases: FileFormatException

Indicates an error parsing a packed-refs file.

exception dulwich.errors.RefFormatError

Bases: Exception

Indicates an invalid ref name.

exception dulwich.errors.SendPackError(*args, **kwargs)

Bases: GitProtocolError

An error occurred during send_pack.

exception dulwich.errors.UnexpectedCommandError(command)

Bases: GitProtocolError

Unexpected command received in a proto line.

exception dulwich.errors.UpdateRefsError(*args, **kwargs)

Bases: GitProtocolError

The server reported errors updating refs.

exception dulwich.errors.WrongObjectException(sha, *args, **kwargs)

Bases: Exception

Baseclass for all the _ is not a _ exceptions on objects.

Do not instantiate directly.

Subclasses should define a type_name attribute that indicates what was expected if they were raised.