Skip to content

Commit

Permalink
Provider shouldn't call log.Fatal, return error instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishth09 committed May 12, 2017
1 parent ddb4417 commit f6f2568
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/providers/ibmcloud/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ func (c *Config) ClientSession() (interface{}, error) {

accClient, err := accountv2.New(sess.BluemixSession)
if err != nil {
log.Fatal(err)
return nil, err
}
accountAPI := accClient.Accounts()

clusterClient, err := k8sclusterv1.New(sess.BluemixSession)
if err != nil {
log.Fatal(err)
return nil, err
}
clustersAPI := clusterClient.Clusters()
clusterWorkerAPI := clusterClient.Workers()
Expand All @@ -226,7 +226,7 @@ func (c *Config) ClientSession() (interface{}, error) {
bluemixAccountClient: accountAPI,
}

return session, err
return session, nil
}

func newSession(c *Config) (*Session, error) {
Expand Down

0 comments on commit f6f2568

Please sign in to comment.