environs/simplestreams: simplify body closure #3346

Merged
merged 1 commit into from Sep 23, 2015

Conversation

Projects
None yet
3 participants
Member

axw commented Sep 22, 2015

No description provided.

environs/simplestreams/datasource.go
if resp.StatusCode != http.StatusOK {
resp.Body.Close()
+ if resp.StatusCode == http.StatusNotFound {
@davecheney

davecheney Sep 22, 2015

Contributor

could i push my luck by asking for a switch statement ?

Member

axw commented Sep 22, 2015

$$merge$$

Contributor

jujubot commented Sep 22, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Sep 22, 2015

Build failed: Does not match ['fixes-1497297']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/4831

Member

axw commented Sep 23, 2015

$$merge$$

Contributor

jujubot commented Sep 23, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Sep 23, 2015

Merge pull request #3346 from axw/simplestreams-close-body-moar-cleaner
environs/simplestreams: simplify body closure

@jujubot jujubot merged commit 0736bfd into juju:master Sep 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment