Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
deadc0de6 committed Oct 23, 2024
1 parent 0624a61 commit adc0ab5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions dotdrop/cfg_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1359,15 +1359,13 @@ def _validate(self, yamldict):

# check settings values
settings = yamldict[self.key_settings]
if self.key_settings_link_dotfile_default not in settings:
msg = f'no \"{self.key_settings_link_dotfile_default}\" key found'
raise YamlException(msg)
val = settings[self.key_settings_link_dotfile_default]
if val not in self.allowed_link_val:
err = f'bad link value: {val}'
self._log.err(err)
self._log.err(f'allowed: {self.allowed_link_val}')
raise YamlException(f'config content error: {err}')
if self.key_settings_link_dotfile_default in settings:
val = settings[self.key_settings_link_dotfile_default]
if val not in self.allowed_link_val:
err = f'bad link value: {val}'
self._log.err(err)
self._log.err(f'allowed: {self.allowed_link_val}')
raise YamlException(f'config content error: {err}')

@classmethod
def _yaml_load(cls, path):
Expand Down

0 comments on commit adc0ab5

Please sign in to comment.