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.
- exception craft_parts.sources.errors.HttpRequestError(*, status_code, reason, source)[source]¶
Bases:
SourceError
HTTP 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:
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.
- exception craft_parts.sources.errors.InvalidRpmPackage(rpm_file)[source]¶
Bases:
SourceError
An rpm package is invalid.
- Parameters:
rpm_file (
str
) – The filename.
- exception craft_parts.sources.errors.InvalidSnapPackage(snap_file)[source]¶
Bases:
SourceError
A snap package is invalid.
- Parameters:
snap_file (
str
) – The snap file name.
- 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.
- 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.
- 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.
- exception craft_parts.sources.errors.NetworkRequestError(message, *, source=None)[source]¶
Bases:
SourceError
A network request operation failed.
- Parameters:
message (
str
) – The error message.source (
Optional
[str
]) – URL of unreachable source.
- 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.
- exception craft_parts.sources.errors.SourceError(brief, details=None, resolution=None, doc_slug=None)[source]¶
Bases:
PartsError
Base class for source handler errors.
- Parameters:
brief (
str
)details (
Optional
[str
])resolution (
Optional
[str
])doc_slug (
Optional
[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.
- exception craft_parts.sources.errors.SourceUpdateUnsupported(name)[source]¶
Bases:
SourceError
The source handler doesn’t support updating.
- Parameters:
name (
str
) – The source type.
- exception craft_parts.sources.errors.VCSError(message)[source]¶
Bases:
SourceError
A version control system command failed.
- Parameters:
message (
str
)