Open
Conversation
houndci-bot
reviewed
Oct 18, 2019
| ) | ||
|
|
||
| del ctx.config['password'] | ||
| save_config(ctx.config_file, ctx.config) |
There was a problem hiding this comment.
'save_config' may be undefined, or defined from star imports: panoptes_cli.commands.configure, panoptes_cli.commands.info, panoptes_cli.commands.project, panoptes_cli.commands.subject, panoptes_cli.commands.subject_set, panoptes_cli.commands.user, panoptes_cli.commands.workflow
| password, | ||
| ) | ||
| retrieved_password = keyring.get_password( | ||
| 'panoptes', |
| ctx.config['username'], | ||
| password, | ||
| ) | ||
| retrieved_password = keyring.get_password( |
There was a problem hiding this comment.
local variable 'retrieved_password' is assigned to but never used
| yaml.dump(ctx.parent.config, conf_f, default_flow_style=False) | ||
| def save_config(config_file, config): | ||
| with open(config_file, 'w') as conf_f: | ||
| yaml.dump(config, conf_f, default_flow_style=False) No newline at end of file |
| 'Error: Invalid endpoint supplied. Endpoint must be an HTTPS URL.' | ||
| ) | ||
| return -1 | ||
|
|
adammcmaster
commented
Oct 18, 2019
| retrieved_password = keyring.get_password( | ||
| 'panoptes', | ||
| ctx.config['username'], | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
To do: Compare password and retrieved_password here to verify keyring is working.
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.
I initially (in #56) ruled out using this because on Linux it can require packages to be installed separately, but I think that will be fine as long as it falls back to something sensible if keyring isn't available.
The implementation here is pretty much done and just needs to be tested, however it looks like the keyring module is parsing command-line arguments when it shouldn't be, so it may not behave correctly. I think this is a side effect of keyring bundling its own command line tool, so the next task is to work around that (or possibly raise an issue upstream).
Closes #56