Fix case where DSDA not being set in the config caused a crash.

This commit is contained in:
yrriban 2025-10-09 18:59:18 -04:00
parent fa176ae6ed
commit c1e4156f3c

View file

@ -15,7 +15,7 @@ class ConfigBase(object):
self.doom.joinpath(self.config_name)).read() self.doom.joinpath(self.config_name)).read()
self._dsda = self._config.get("dsda") self._dsda = self._config.get("dsda")
if self.dsda is None: if self._dsda is None:
raise Exception( raise Exception(
"required key 'dsda' not set in config " "required key 'dsda' not set in config "
+ f"{self.doom.joinpath(self.config_name)}.") + f"{self.doom.joinpath(self.config_name)}.")
@ -37,7 +37,7 @@ class ConfigBase(object):
propname = "_".join(what) propname = "_".join(what)
val = self._config val = self._config
for w in what: for w in what:
val = val[w] val = val.get(w)
if val is None: if val is None:
val = default val = default
break break