Skip to content

Commit 714c9bc

Browse files
committed
Use validate_dict for more accurate error messages
1 parent 51717ab commit 714c9bc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

readthedocs/config/config.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,8 @@ def validate_conda(self):
438438

439439
if 'conda' in self.raw_config:
440440
raw_conda = self.raw_config['conda']
441-
if not isinstance(raw_conda, dict):
442-
self.error(
443-
'conda',
444-
self.PYTHON_INVALID_MESSAGE,
445-
code=PYTHON_INVALID)
446-
441+
with(self.catch_validation_error('conda')):
442+
validate_dict(raw_conda)
447443
conda_environment = None
448444
if 'file' in raw_conda:
449445
with self.catch_validation_error('conda.file'):

0 commit comments

Comments
 (0)