check access key and secret before run

This commit is contained in:
tgic 2015-06-16 14:06:04 +08:00
parent ee9971a5af
commit 3a240de22e

View File

@ -104,11 +104,11 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
// be summoned when GetAuth is called) // be summoned when GetAuth is called)
accessKey, ok := parameters["accesskeyid"] accessKey, ok := parameters["accesskeyid"]
if !ok { if !ok {
accessKey = "" return nil, fmt.Errorf("No accesskeyid parameter provided")
} }
secretKey, ok := parameters["accesskeysecret"] secretKey, ok := parameters["accesskeysecret"]
if !ok { if !ok {
secretKey = "" return nil, fmt.Errorf("No accesskeysecret parameter provided")
} }
regionName, ok := parameters["region"] regionName, ok := parameters["region"]