Fix truncated error messages in directives (#6320)

Fixes #6299

Error messages in 'directives' were split across multiple lines and not
properly concatenated, which led to truncated messages.
This commit is contained in:
scheibelp 2017-11-15 10:33:59 -08:00 committed by GitHub
parent 2eb7fabe62
commit b9be9519e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -522,8 +522,8 @@ def _execute_resource(pkg):
# Check if the path is relative
if os.path.isabs(destination):
message = 'The destination keyword of a resource directive '
'can\'t be an absolute path.\n'
message = ('The destination keyword of a resource directive '
'can\'t be an absolute path.\n')
message += "\tdestination : '{dest}\n'".format(dest=destination)
raise RuntimeError(message)
@ -534,8 +534,8 @@ def _execute_resource(pkg):
) # Normalized absolute path
if test_path not in normalized_destination:
message = "The destination folder of a resource must fall "
"within the main package stage directory.\n"
message = ("The destination folder of a resource must fall "
"within the main package stage directory.\n")
message += "\tdestination : '{dest}'\n".format(dest=destination)
raise RuntimeError(message)