Skip to content

Commit

Permalink
Correctly print hostname in error
Browse files Browse the repository at this point in the history
With "+" the strings are separate expressions, and format() is called on the last string before concatenation. (So substitution does not happen.) Without "+" the string literals are merged first by the parser, so format() is called on the complete string.
  • Loading branch information
darabos committed Jul 8, 2015
1 parent 8a9d9cc commit be0d3b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ec2/spark_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,8 +1153,8 @@ def ssh(host, opts, command):
# If this was an ssh failure, provide the user with hints.
if e.returncode == 255:
raise UsageError(
"Failed to SSH to remote host {0}.\n" +
"Please check that you have provided the correct --identity-file and " +
"Failed to SSH to remote host {0}.\n"
"Please check that you have provided the correct --identity-file and "
"--key-pair parameters and try again.".format(host))
else:
raise e
Expand Down

0 comments on commit be0d3b7

Please sign in to comment.