Skip to content

Commit 8498d31

Browse files
committed
lesson_check.py: fix error message for the 'defaults' check
1 parent 6b49768 commit 8498d31

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bin/lesson_check.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,14 @@ def check_config(reporter, source_dir):
208208
{'values': {'root': '..', 'layout': 'episode'}, 'scope': {'type': 'episodes', 'path': ''}},
209209
{'values': {'root': '..', 'layout': 'page'}, 'scope': {'type': 'extras', 'path': ''}}
210210
]:
211-
reporter.check(defaults in config.get('defaults', []),
212-
'configuration',
213-
'"root" not set to "." in configuration')
211+
error_text = 'incorrect settings for: root "{0}" layout "{1}"'
212+
root = defaults["values"]["root"]
213+
layout = defaults["values"]["layout"]
214+
error_message = error_text.format(root, layout)
215+
216+
defaults_test = defaults in config.get('defaults', [])
217+
reporter.check(defaults_test, 'configuration', error_message)
218+
214219
if 'life_cycle' not in config:
215220
config['life_cycle'] = None
216221
return config['life_cycle']

0 commit comments

Comments
 (0)