Repository navigation
Start, restart, pause and unpause exit with non-zero if nothing to do - #2550
Merged
Merged
Conversation
There was a problem hiding this comment.
Since this method doesn't use self, can we make it a module level function? There are a bunch of these at the bottom of the file.
There was a problem hiding this comment.
I also wonder if it would be more correct to raise an exception here, to be handled by main() above, which already does a bunch of this kind of thing. That way we'd only have sys.exit() in a single function.
|
Thanks for the PR! I think this looks good, just a couple small requests. I should also note that in the case where containers already exist in the desired state there won't be any errors, but I think that's correct behaviour. |
Signed-off-by: Dimitar Bonev <[email protected]>
dbonev
force-pushed
the
1236-restart-to-exit-with-non-zero
branch
from
December 15, 2015 21:11
5912860 to
bc843d6
Compare
Author
|
@dnephin Thanks for the feedback. Done both:
Thanks |
|
LGTM |
1 similar comment
|
LGTM |
aanand
added a commit
that referenced
this pull request
Dec 16, 2015
Start, restart, pause and unpause exit with non-zero if nothing to do
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When there are no containers to restart (pause, unpause or start respectively), compose will now exit with non-zero status, printing an error message. This allows for usage like
Fixes #1236
Signed-off-by: Dimitar Bonev [email protected]