Skip to content

Commit f065092

Browse files
committed
improve error handling when fileNotFound exceptions are raised by
modules Signed-off-by: Zen <[email protected]>
1 parent b0e8deb commit f065092

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ugrd/initramfs_generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ def load_config(self, config_filename) -> None:
5757
# Process into the config dict, it should handle parsing
5858
for config, value in raw_config.items():
5959
self.logger.debug("[%s] (%s) Processing config value: %s" % (config_file.name, config, value))
60-
self[config] = value
60+
try:
61+
self[config] = value
62+
except FileNotFoundError as e:
63+
raise ValueError("[%s] Error loading config parameter '%s': %s" % (config_file.name, config, e))
6164

6265
self.logger.debug("Loaded config:\n%s" % self.config_dict)
6366

0 commit comments

Comments
 (0)