-
Notifications
You must be signed in to change notification settings - Fork 310
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
Restore prompts while retaining support for suppressing prompts #452
Conversation
Codecov Report
@@ Coverage Diff @@
## master #452 +/- ##
=========================================
+ Coverage 79.94% 80.85% +0.9%
=========================================
Files 14 14
Lines 748 893 +145
Branches 108 141 +33
=========================================
+ Hits 598 722 +124
- Misses 114 132 +18
- Partials 36 39 +3
Continue to review full report at Codecov.
|
@@ -195,7 +195,7 @@ def get_userpass_value(cli_value, config, key, prompt_strategy=None): | |||
""" | |||
if cli_value is not None: | |||
return cli_value | |||
elif key in config: | |||
elif config.get(key) is not None: |
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.
Always remember your none checks
As discussed in #450, the work in #426 had some unintended side-effects, namely that it unconditionally suppressed prompts for username and password (and thus also keyring resolution).
This PR goes back in time, committing tests to the code prior to #426 plus some commits on top of #426, then merges the two, fixing the failing tests.