Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Refactor some calls to avoid repeatition. #7193
Conversation
| @@ -48,10 +48,11 @@ func DestroyModel(st ModelManagerBackend, modelTag names.ModelTag) error { | ||
| func destroyModel(st ModelManagerBackend, modelTag names.ModelTag, destroyHostedModels bool) error { | ||
| var err error | ||
| if modelTag != st.ModelTag() { | ||
| - if st, err = st.ForModel(modelTag); err != nil { | ||
| + st, err = st.ForModel(modelTag) | ||
| + defer st.Close() |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 55d95c5
into
juju:develop
Apr 3, 2017
anastasiamac
deleted the
anastasiamac:tiny-consolidation
branch
Apr 3, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
anastasiamac commentedApr 3, 2017
Description of change
Consolidating calls to avoid duplicating the same functionality in different places. I've noticed these while investigating model destruction failures.
QA steps
internal change - no additional QA
Documentation changes
n/a
Bug reference
n/a