Skip to content

Commit d729795

Browse files
committed
[python] Raise error for constructing RuntimeConfig from bad storage.
Until now, this was just silently ignored, which was surprising. Signed-off-by: Ben Pfaff <blp@feldera.com>
1 parent bcac402 commit d729795

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

python/feldera/runtime_config.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ def __init__(
101101
}
102102
if resources is not None:
103103
self.resources = resources.__dict__
104-
if isinstance(storage, bool):
105-
self.storage = storage
106-
if isinstance(storage, Storage):
107-
self.storage = storage.__dict__
104+
if storage is not None:
105+
if isinstance(storage, bool):
106+
self.storage = storage
107+
elif isinstance(storage, Storage):
108+
self.storage = storage.__dict__
109+
else:
110+
raise ValueError(f"Unknown value '{storage}' for storage")
108111

109112
@staticmethod
110113
def default() -> "RuntimeConfig":

0 commit comments

Comments
 (0)