Skip to content
Snippets Groups Projects
Unverified Commit 37706414 authored by Newbyte's avatar Newbyte :snowflake: Committed by Oliver Smith
Browse files

pmb.qemu.run: Use NonBugError for nonexistent rootfs code path (MR 2540)

We fully expect to reach this code path within normal use of
pmbootstrap. It's not a bug if we get here. As such, use NonBugError to
indicate that and clean up the output.
parent 8c55680b
No related branches found
No related tags found
1 merge request!2540pmb.netboot: Only attempt to install nbd after rootfs existance check + Use NonBugError for nonexistent rootfs code path
Pipeline #217013 passed
......@@ -6,6 +6,7 @@ from pmb.core.arch import Arch
from pmb.core.config import Config
from pmb.core.context import get_context
from pmb.helpers import logging
from pmb.helpers.exceptions import NonBugError
import os
from pathlib import Path
import re
......@@ -36,7 +37,7 @@ def system_image(device: str) -> Path:
path = Chroot.native() / "home/pmos/rootfs" / f"{device}.img"
if not path.exists():
logging.debug(f"Could not find rootfs: {path}")
raise RuntimeError(
raise NonBugError(
"The rootfs has not been generated yet, please run 'pmbootstrap install' first."
)
return path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment