Fix case where DSDA not being set in the config caused a crash.
This commit is contained in:
parent
fa176ae6ed
commit
c1e4156f3c
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue