Merge lp:~jtv/gwacl/missing-error-check into lp:gwacl

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: 194
Merged at revision: 194
Proposed branch: lp:~jtv/gwacl/missing-error-check
Merge into: lp:gwacl
Diff against target: 12 lines (+3/-0)
1 file modified
management_base.go (+3/-0)
To merge this branch: bzr merge lp:~jtv/gwacl/missing-error-check
Reviewer Review Type Date Requested Status
Gavin Panella Approve
Review via email: mp+175826@code.launchpad.net

Commit message

Missing error check in CreateAffinityGroup.

Description of the change

Another case of making error handling broken by default. Another nail in the coffin of the "Go forces you to think about error handling" myth. A traceback would have been perfectly acceptable, but continuing on with a nil pointer was not.

Jeroen

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

Test?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'management_base.go'
--- management_base.go 2013-07-18 14:08:17 +0000
+++ management_base.go 2013-07-19 13:22:29 +0000
@@ -448,6 +448,9 @@
448 return err448 return err
449 }449 }
450 response, err := api.session.post(url, "2012-03-01", []byte(body), "application/xml")450 response, err := api.session.post(url, "2012-03-01", []byte(body), "application/xml")
451 if err != nil {
452 return err
453 }
451 return api.blockUntilCompleted(response)454 return api.blockUntilCompleted(response)
452}455}
453456

Subscribers

People subscribed via source and target branches