Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Commit 6052f8b

Browse files
committed
handle missing driver at exporter side separately
1 parent 1405cd7 commit 6052f8b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/jumpstarter/jumpstarter/config/exporter.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from .common import ObjectMeta
1313
from .grpc import call_credentials
1414
from .tls import TLSConfigV1Alpha1
15-
from jumpstarter.common.exceptions import ConfigurationError
15+
from jumpstarter.common.exceptions import ConfigurationError, MissingDriverError
1616
from jumpstarter.common.grpc import aio_secure_channel, ssl_channel_credentials
1717
from jumpstarter.common.importlib import import_class
1818
from jumpstarter.driver import Driver
@@ -44,7 +44,12 @@ class ExporterConfigV1Alpha1DriverInstance(RootModel):
4444
def instantiate(self) -> Driver:
4545
match self.root:
4646
case ExporterConfigV1Alpha1DriverInstanceBase():
47-
driver_class = import_class(self.root.type, [], True)
47+
try:
48+
driver_class = import_class(self.root.type, [], True)
49+
except MissingDriverError:
50+
raise ConfigurationError(
51+
f"Exporter configuration: Driver '{self.root.type}' is not installed.\n\n"
52+
) from None
4853

4954
children = {name: child.instantiate() for name, child in self.root.children.items()}
5055

0 commit comments

Comments
 (0)