check access key and secret before run

This commit is contained in:
tgic 2015-06-16 14:06:04 +08:00
parent d28a3fa28a
commit fc20dd72d6

View file

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