Skip to content

Commit

Permalink
Merge pull request #46 from rymndhng/fix-region-enum
Browse files Browse the repository at this point in the history
Fix region enum
  • Loading branch information
ndeloof committed Jan 28, 2015
2 parents 38d2456 + 99eda78 commit ba1cf7c
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -120,7 +120,14 @@ public FingerprintRecord invoke(FilePath file) throws IOException, InterruptedEx
}

private void setRegion() {
Region region = RegionUtils.getRegion(Regions.fromName(selregion).getName());
// In 0.7, selregion comes from Regions#name
Region region = RegionUtils.getRegion(selregion);

// In 0.6, selregion comes from Regions#valueOf
if (region == null) {
region = RegionUtils.getRegion(Regions.valueOf(selregion).getName());
}

getClient().setRegion(region);
}
}

0 comments on commit ba1cf7c

Please sign in to comment.