craft_parts.sources.errors module

Source handler error definitions.

exception craft_parts.sources.errors.ChecksumMismatch(*, expected, obtained)[source]

Bases: SourceError

A checksum doesn’t match the expected value.

Parameters:
  • expected (str) – The expected checksum.

  • obtained (str) – The actual checksum.

brief: str
exception craft_parts.sources.errors.IncompatibleSourceOptions(source_type, options)[source]

Bases: SourceError

Source specified options that cannot be used at the same time.

Parameters:
  • source_type (str) – The part’s source type.

  • options (List[str]) – The list of incompatible source options.

brief: str
exception craft_parts.sources.errors.InvalidRpmPackage(rpm_file)[source]

Bases: SourceError

An rpm package is invalid.

Parameters:

rpm_file (str) – The filename.

brief: str
exception craft_parts.sources.errors.InvalidSnapPackage(snap_file)[source]

Bases: SourceError

A snap package is invalid.

Parameters:

snap_file (str) – The snap file name.

brief: str
exception craft_parts.sources.errors.InvalidSourceOption(*, source_type, option)[source]

Bases: SourceError

A source option is not allowed for the given source type.

Parameters:
  • source_type (str) – The part’s source type.

  • option (str) – The invalid source option.

brief: str
exception craft_parts.sources.errors.InvalidSourceOptions(*, source_type, options)[source]

Bases: SourceError

A source option is not allowed for the given source type.

Parameters:
  • source_type (str) – The part’s source type.

  • options (List[str]) – The invalid source options.

brief: str
exception craft_parts.sources.errors.InvalidSourceType(source)[source]

Bases: SourceError

Failed to determine a source type.

Parameters:

source (str) – The source defined for the part.

brief: str
exception craft_parts.sources.errors.NetworkRequestError(message)[source]

Bases: SourceError

A network request operation failed.

Parameters:

message (str) – The error message.

brief: str
exception craft_parts.sources.errors.PullError(*, command, exit_code)[source]

Bases: SourceError

Failed pulling source.

Parameters:
  • command (Sequence) – The command used to pull the source.

  • exit_code (int) – The command exit code.

brief: str
exception craft_parts.sources.errors.SourceError(brief, details=None, resolution=None)[source]

Bases: PartsError

Base class for source handler errors.

Parameters:
  • brief (str) –

  • details (Optional[str]) –

  • resolution (Optional[str]) –

brief: str
exception craft_parts.sources.errors.SourceNotFound(source)[source]

Bases: SourceError

Failed to retrieve a source.

Parameters:

source (str) – The source defined for the part.

brief: str
exception craft_parts.sources.errors.SourceUpdateUnsupported(name)[source]

Bases: SourceError

The source handler doesn’t support updating.

Parameters:

name (str) – The source type.

brief: str
exception craft_parts.sources.errors.VCSError(message)[source]

Bases: SourceError

A version control system command failed.

Parameters:

message (str) –

brief: str