Fix regionName parameter so as to not have a panic when it is not a string
This commit is contained in:
parent
03406ab708
commit
671c69e0df
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
|
|||
secretKey, _ := parameters["secretkey"]
|
||||
|
||||
regionName, ok := parameters["region"]
|
||||
if !ok || regionName.(string) == "" {
|
||||
if !ok || fmt.Sprint(regionName) == "" {
|
||||
return nil, fmt.Errorf("No region parameter provided")
|
||||
}
|
||||
region := aws.GetRegion(fmt.Sprint(regionName))
|
||||
|
|
Loading…
Reference in a new issue