Explain the explanation about file versions

This explanation looked like it was part of the error. Added an
extra new line and a bit of copy to explain the explanation.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
Ben Firshman 2016-04-20 16:35:22 -07:00 committed by Joffrey F
parent 85b85bc675
commit 70a605acac
2 changed files with 6 additions and 5 deletions

View File

@ -3,10 +3,11 @@ from __future__ import unicode_literals
VERSION_EXPLANATION = ( VERSION_EXPLANATION = (
'Either specify a version of "2" (or "2.0") and place your service ' 'You might be seeing this error because you\'re using the wrong Compose '
'definitions under the `services` key, or omit the `version` key and place ' 'file version. Either specify a version of "2" (or "2.0") and place your '
'your service definitions at the root of the file to use version 1.\n' 'service definitions under the `services` key, or omit the `version` key '
'For more on the Compose file format versions, see ' 'and place your service definitions at the root of the file to use '
'version 1.\nFor more on the Compose file format versions, see '
'https://docs.docker.com/compose/compose-file/') 'https://docs.docker.com/compose/compose-file/')

View File

@ -219,7 +219,7 @@ def handle_error_for_schema_with_id(error, path):
return get_unsupported_config_msg(path, invalid_config_key) return get_unsupported_config_msg(path, invalid_config_key)
if not error.path: if not error.path:
return '{}\n{}'.format(error.message, VERSION_EXPLANATION) return '{}\n\n{}'.format(error.message, VERSION_EXPLANATION)
def handle_generic_error(error, path): def handle_generic_error(error, path):