-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix leapp prints nothing when running with no args on python3.6+ #731
Conversation
Can one of the admins verify this patch? |
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
A change introduced in the stdlib argparse module accidentally caused all subparsers to become optional instead of required as in python 2.7. This change therefore causes leapp to print nothing and exit with error code 0 when being executed without any arguments. This commit marks the subparser action as required, so that the python3.6 module recognizes this situation and prints the usage message. To provide a meaningful message on python3.6 the subparser action was edited to use 'command' metavar and the 'title' option was dropped.
35de37b
to
dbfc496
Compare
This PR has been linked in issue tracker (#OAMG-5488). |
The usage message running python2.7 without any arguments is changed by this PR to (notice the added metavar
Running
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works as expected.
## Packaging - Drop the dependency on leapp-repository for Fedora and RHEL 8+ (oamg#717) - Provide builds for RHEL 7+ and Fedora (oamg#717) - Drop automatically generated Python dependences on RHEL 8+ and Fedora systems (oamg#717, oamg#716) - Bump the provided leapp-framework capability to 2.0 (oamg#700) ## Framework ### Fixes - models: Do not make references to private symbols (oamg#718) ### Enhancements - Introduce the LEAPP_DEVEL_DATABASE_SYNC_OFF envar to enable speed up writes into the leapp database by disabling synchronisation - only for development / testing purposes (oamg#732) ## Leapp ### Fixes - Fix print of the leapp help msg for Python 3.6+ (oamg#731) ### Enhancements - The leapp commands are now defined/provided by leapp-repositories; leapp discovers the specified commands automatically (oamg#700) - Add CLI support for `choices` and `default` for options of leapp commands (oamg#734) ## Modifications - Makefile: Added the `fast_lint` target to apply linters just on files different from master (oamg#733)
## Packaging - Drop the dependency on leapp-repository for Fedora and RHEL 8+ (oamg#717) - Provide builds for RHEL 7+ and Fedora (oamg#717) - Drop automatically generated Python dependences on RHEL 8+ and Fedora systems (oamg#717, oamg#716) - Bump the provided leapp-framework capability to 2.0 (oamg#700) ## Framework ### Fixes - models: Do not make references to private symbols (oamg#718) ### Enhancements - Introduce the LEAPP_DEVEL_DATABASE_SYNC_OFF envar to enable speed up writes into the leapp database by disabling synchronisation - only for development / testing purposes (oamg#732) ## Leapp ### Fixes - Fix print of the leapp help msg for Python 3.6+ (oamg#731) ### Enhancements - The leapp commands are now defined/provided by leapp-repositories; leapp discovers the specified commands automatically (oamg#700) - Add CLI support for `choices` and `default` for options of leapp commands (oamg#734) ## Modifications - Makefile: Added the `fast_lint` target to apply linters just on files different from master (oamg#733)
## Packaging - Drop the dependency on leapp-repository for Fedora and RHEL 8+ (#717) - Provide builds for RHEL 7+ and Fedora (#717) - Drop automatically generated Python dependences on RHEL 8+ and Fedora systems (#717, #716) - Bump the provided leapp-framework capability to 2.0 (#700) ## Framework ### Fixes - models: Do not make references to private symbols (#718) ### Enhancements - Introduce the LEAPP_DEVEL_DATABASE_SYNC_OFF envar to enable speed up writes into the leapp database by disabling synchronisation - only for development / testing purposes (#732) ## Leapp ### Fixes - Fix print of the leapp help msg for Python 3.6+ (#731) ### Enhancements - The leapp commands are now defined/provided by leapp-repositories; leapp discovers the specified commands automatically (#700) - Add CLI support for `choices` and `default` for options of leapp commands (#734) ## Modifications - Makefile: Added the `fast_lint` target to apply linters just on files different from master (#733)
A change introduced in the stdlib argparse module accidentally caused
all subparsers to become optional instead of required as in python 2.7.
This change therefore causes leapp to print nothing and exit with error
code 0 when being executed without any arguments.
This commit marks the subparser action as required, so that the
python3.6 module recognizes this situation and prints the usage message.
To provide a meaningful message on python3.6 the subparser action was
edited to use 'command' metavar and the 'title' option was dropped.
Tasks to be done:
metavar
/title
changes performed.