mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 10:14:17 +00:00
ensure workdir is defined
This commit is contained in:
@@ -42,6 +42,7 @@ class CfgAggregator:
|
|||||||
self.dry = dry
|
self.dry = dry
|
||||||
self.log = Logger(debug=self.debug)
|
self.log = Logger(debug=self.debug)
|
||||||
self._load()
|
self._load()
|
||||||
|
self._validate()
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# public methods
|
# public methods
|
||||||
@@ -218,6 +219,12 @@ class CfgAggregator:
|
|||||||
# parsing
|
# parsing
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
|
def _validate(self):
|
||||||
|
"""validate fields on top level view of config"""
|
||||||
|
val = self.settings.workdir
|
||||||
|
if not val:
|
||||||
|
raise UndefinedException('\"workdir\" is undefined')
|
||||||
|
|
||||||
def _load(self, reloading=False):
|
def _load(self, reloading=False):
|
||||||
"""load lower level config"""
|
"""load lower level config"""
|
||||||
self.cfgyaml = CfgYaml(self.path,
|
self.cfgyaml = CfgYaml(self.path,
|
||||||
|
|||||||
@@ -1215,6 +1215,8 @@ class CfgYaml:
|
|||||||
if not yamldict[self.key_settings]:
|
if not yamldict[self.key_settings]:
|
||||||
# configs empty
|
# configs empty
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# check settings values
|
||||||
settings = yamldict[self.key_settings]
|
settings = yamldict[self.key_settings]
|
||||||
if self.key_settings_link_dotfile_default not in settings:
|
if self.key_settings_link_dotfile_default not in settings:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user