Skip to main content

AmbiguousKernelRoot

Nothing says which configured kernel root a download belongs in.

Usage

Source

AmbiguousKernelRoot(
    mission,
    roots,
    stored=False,
)

Raised by KernelDB.root_for when several kernel roots are configured and the available facts do not single one out. root_for derives the root from the metakernel’s own path, then from the one configured root, then from where the mission’s kernels already are. With several roots and none of those facts it never picks the first (decided 2026-11-21). get_metakernel, update_metakernel and scan_directory(archive=True) call root_for, so they raise it too. Subclass of LookupError.

At a terminal the CLI lists roots and asks. In a script it exits with code 2, and --download-dir is the explicit answer.

Attributes

mission: str | None

The mission the download is for, or None when no mission is involved.

roots: list[Path]
The candidates. When more than one root already holds kernels of the mission these are those roots, otherwise every configured root.