forked from TrueCloudLab/distribution
Merge pull request #81 from AndreyKostov/storagedriver-s3-fix-param
Fix regionName parameter so as to not have a panic when it is not a string
This commit is contained in:
commit
4dcc892bf2
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