From 671c69e0df0197081b02e19b8fb4cbf6192f6ef5 Mon Sep 17 00:00:00 2001 From: Andrey Kostov Date: Mon, 19 Jan 2015 14:23:28 -0800 Subject: [PATCH] Fix regionName parameter so as to not have a panic when it is not a string --- storagedriver/s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storagedriver/s3/s3.go b/storagedriver/s3/s3.go index 991f2b00..2d76b007 100644 --- a/storagedriver/s3/s3.go +++ b/storagedriver/s3/s3.go @@ -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))