Skip to content

Commit be0d3b7

Browse files
committed
Correctly print hostname in error
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.
1 parent 8a9d9cc commit be0d3b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ec2/spark_ec2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,8 @@ def ssh(host, opts, command):
11531153
# If this was an ssh failure, provide the user with hints.
11541154
if e.returncode == 255:
11551155
raise UsageError(
1156-
"Failed to SSH to remote host {0}.\n" +
1157-
"Please check that you have provided the correct --identity-file and " +
1156+
"Failed to SSH to remote host {0}.\n"
1157+
"Please check that you have provided the correct --identity-file and "
11581158
"--key-pair parameters and try again.".format(host))
11591159
else:
11601160
raise e

0 commit comments

Comments
 (0)