dulwich.errors module

Dulwich-related exception classes and utility functions.

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

Bases: exceptions.Exception

Indicates that applying a delta failed.

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

Bases: exceptions.Exception

A checksum didn’t match the expected contents.

exception dulwich.errors.CommitError

Bases: exceptions.Exception

An error occurred while performing a commit.

exception dulwich.errors.EmptyFileException

Bases: dulwich.errors.FileFormatException

Indicates an empty file instead of the object’s disk representation.

exception dulwich.errors.FileFormatException

Bases: exceptions.Exception

Base class for exceptions relating to reading git file formats.

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

Bases: exceptions.Exception

Git protocol exception.

exception dulwich.errors.HangupException

Bases: dulwich.errors.GitProtocolError

Hangup exception.

exception dulwich.errors.HookError

Bases: exceptions.Exception

An error occurred while executing a hook.

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

Bases: exceptions.Exception

Indicates that a commit was not found in the repository

exception dulwich.errors.NoIndexPresent

Bases: exceptions.Exception

No index is present.

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

Bases: dulwich.errors.WrongObjectException

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

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

Bases: dulwich.errors.WrongObjectException

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

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

Bases: exceptions.Exception

Indicates that no Git repository was found.

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

Bases: dulwich.errors.WrongObjectException

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

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

Bases: dulwich.errors.WrongObjectException

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

type_name = 'tree'
exception dulwich.errors.ObjectFormatException

Bases: dulwich.errors.FileFormatException

Indicates an error parsing an object.

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

Bases: exceptions.Exception

Indicates that a requested object is missing.

exception dulwich.errors.PackedRefsException

Bases: dulwich.errors.FileFormatException

Indicates an error parsing a packed-refs file.

exception dulwich.errors.RefFormatError

Bases: exceptions.Exception

Indicates an invalid ref name.

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

Bases: dulwich.errors.GitProtocolError

An error occurred during send_pack.

exception dulwich.errors.UnexpectedCommandError(command)

Bases: dulwich.errors.GitProtocolError

Unexpected command received in a proto line.

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

Bases: dulwich.errors.GitProtocolError

The server reported errors updating refs.

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

Bases: exceptions.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.