craft_parts.sources.errors module¶
Source handler error definitions.
- exception craft_parts.sources.errors.ChecksumMismatch(*, expected, obtained)[source]¶
Bases:
SourceErrorA checksum doesn’t match the expected value.
- Parameters:
expected (
str) – The expected checksum.obtained (
str) – The actual checksum.
- exception craft_parts.sources.errors.HttpRequestError(*, status_code, reason, source)[source]¶
Bases:
SourceErrorHTTP error occurred during request processing.
- Parameters:
status_code (
int) – Request status code.reason (
str) – Text explaining status code.source (
str) – The source defined for the part.
- exception craft_parts.sources.errors.IncompatibleSourceOptions(source_type, options)[source]¶
Bases:
SourceErrorSource 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.
- exception craft_parts.sources.errors.InvalidRpmPackage(rpm_file)[source]¶
Bases:
SourceErrorAn rpm package is invalid.
- Parameters:
rpm_file (
str) – The filename.
- exception craft_parts.sources.errors.InvalidSnapPackage(snap_file)[source]¶
Bases:
SourceErrorA snap package is invalid.
- Parameters:
snap_file (
str) – The snap file name.
- exception craft_parts.sources.errors.InvalidSourceOption(*, source_type, option)[source]¶
Bases:
SourceErrorA 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.
- exception craft_parts.sources.errors.InvalidSourceOptions(*, source_type, options)[source]¶
Bases:
SourceErrorA 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.
- exception craft_parts.sources.errors.InvalidSourceType(source, *, source_type=None)[source]¶
Bases:
SourceErrorFailed to determine a source type.
- Parameters:
source (
str) – The source defined for the part.source_type (
str|None)
- exception craft_parts.sources.errors.NetworkRequestError(message, *, source=None)[source]¶
Bases:
SourceErrorA network request operation failed.
- Parameters:
message (
str) – The error message.source (
str|None) – URL of unreachable source.
- exception craft_parts.sources.errors.PullError(*, command, exit_code, resolution=None)[source]¶
Bases:
SourceErrorFailed pulling source.
- Parameters:
command (
Sequence[str|Path]) – The command used to pull the source.exit_code (
int) – The command exit code.resolution (
str|None)
- exception craft_parts.sources.errors.SourceError(brief, details=None, resolution=None, doc_slug=None)[source]¶
Bases:
PartsErrorBase class for source handler errors.
- Parameters:
brief (
str)details (
str|None)resolution (
str|None)doc_slug (
str|None)
- exception craft_parts.sources.errors.SourceNotFound(source)[source]¶
Bases:
SourceErrorFailed to retrieve a source.
- Parameters:
source (
str) – The source defined for the part.
- exception craft_parts.sources.errors.SourceUpdateUnsupported(name)[source]¶
Bases:
SourceErrorThe source handler doesn’t support updating.
- Parameters:
name (
str) – The source type.
- exception craft_parts.sources.errors.VCSError(message, resolution=None)[source]¶
Bases:
SourceErrorA version control system command failed.
- Parameters:
message (
str)resolution (
str|None)