bpo-34532: Fixed exit code for py.exe list versions arg#9039
Merged
zooba merged 3 commits intopython:masterfrom Nov 20, 2018
Merged
bpo-34532: Fixed exit code for py.exe list versions arg#9039zooba merged 3 commits intopython:masterfrom
zooba merged 3 commits intopython:masterfrom
Conversation
Previously, any of the list version args would cause the launcher to exit with the `RC_NO_PYTHON` error code. This change causes the list version args to exit successfully.
zooba
reviewed
Sep 4, 2018
PC/launcher.c
Outdated
| valid = show_python_list(argv); /* Check for -0 or --list FIRST */ | ||
| show_python_list(argv); | ||
| version_call = TRUE; | ||
| executable = NULL; |
Member
There was a problem hiding this comment.
Why not just return immediately from here? There doesn't seem to be any cleanup that has to happen.
Contributor
Author
There was a problem hiding this comment.
I wrote it to imitate the behavior of -h where it'll search for any Python version and return RC_NO_PYTHON if nothing is found. If that's not desirable, could just bump the check up a level.
1fccd57 to
10e01f0
Compare
Contributor
Author
|
Moved return up as advised |
zooba
approved these changes
Nov 20, 2018
Contributor
Contributor
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Nov 20, 2018
(cherry picked from commit c8fe9cc) Co-authored-by: Brendan Gerrity <brerrity@gmail.com>
|
GH-10622 is a backport of this pull request to the 3.7 branch. |
Contributor
|
Sorry, @bgerrity and @zooba, I could not cleanly backport this to |
Member
|
Doesn't need to go to 3.6 |
miss-islington
added a commit
that referenced
this pull request
Nov 20, 2018
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.
Previously, any of the list version args would cause the launcher to exit with the
RC_NO_PYTHONerror code. This change causes the list version args to exit successfully.https://bugs.python.org/issue34532