Skip to content

Commit

Permalink
Merge pull request #108 from recampbell/JENKINS-24676
Browse files Browse the repository at this point in the history
[FIXED JENKINS-24676]: Give the user a readable error message
  • Loading branch information
francisu committed Oct 27, 2014
2 parents d823b5e + 954f599 commit 420806e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/hudson/plugins/ec2/AmazonEC2Cloud.java
Expand Up @@ -24,6 +24,7 @@
package hudson.plugins.ec2;

import hudson.Extension;
import hudson.Util;
import hudson.slaves.Cloud;
import hudson.util.FormValidation;
import hudson.util.ListBoxModel;
Expand Down Expand Up @@ -146,6 +147,11 @@ public FormValidation doTestConnection(
@QueryParameter String accessId,
@QueryParameter String secretKey,
@QueryParameter String privateKey) throws IOException, ServletException {

if (Util.fixEmpty(region) == null) {
region = DEFAULT_EC2_HOST;
}

return super.doTestConnection(getEc2EndpointUrl(region),accessId,secretKey,privateKey);
}

Expand Down

0 comments on commit 420806e

Please sign in to comment.