Skip to content

Conversation

@bgerrity
Copy link
Contributor

@bgerrity bgerrity commented Sep 3, 2018

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.

https://bugs.python.org/issue34532

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.
PC/launcher.c Outdated
valid = show_python_list(argv); /* Check for -0 or --list FIRST */
show_python_list(argv);
version_call = TRUE;
executable = NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just return immediately from here? There doesn't seem to be any cleanup that has to happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bgerrity bgerrity force-pushed the exit-error branch 4 times, most recently from 1fccd57 to 10e01f0 Compare November 6, 2018 08:28
@bgerrity
Copy link
Contributor Author

bgerrity commented Nov 6, 2018

Moved return up as advised

@miss-islington
Copy link
Contributor

Thanks @bgerrity for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @bgerrity for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 20, 2018
@bedevere-bot
Copy link

GH-10622 is a backport of this pull request to the 3.7 branch.

@miss-islington
Copy link
Contributor

Sorry, @bgerrity and @zooba, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker c8fe9ccf7bfbcf9a2cb48e3b6abacf6ec0e5e58d 3.6

@zooba
Copy link
Member

zooba commented Nov 20, 2018

Doesn't need to go to 3.6

miss-islington added a commit that referenced this pull request Nov 20, 2018
(cherry picked from commit c8fe9cc)

Co-authored-by: Brendan Gerrity <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants