Skip to content
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

bugfix/573 #614

Closed
wants to merge 1 commit into from
Closed

bugfix/573 #614

wants to merge 1 commit into from

Conversation

IbrahimAH
Copy link

@IbrahimAH IbrahimAH commented Dec 15, 2022

per comment in #573, if user stores an empty string, it is returned to the if statement as ''. in python, '' evaluates as false, resulting in it not deleting the secret before trying to set a new one. this results in an error

@IbrahimAH
Copy link
Author

i need some pointers here on why its failing ubuntu tests if the only changes were to the macos backend!

@jaraco
Copy link
Owner

jaraco commented Dec 18, 2022

Test failure was due to issues in the packaging infrastructure relating to new releases of tox, fixed in main.

per comment in 573, if user stores an empty string, it is returned to the if statement. in python, '' evaluates as false, resulting in it not deleting the secret before trying to set a new one. this results in an error
Comment on lines +150 to 151
if find_generic_password(name, service, username, not_found_ok=True) is not None:
delete_generic_password(name, service, username)
Copy link
Owner

Choose a reason for hiding this comment

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

Even better, perhaps one should not pass not_found_ok and trap the NotFound error. Even better than that, invoke the deletion and suppress the NotFound. I'll do that separately. Thanks for raising this to my attention.

@jaraco jaraco closed this Dec 18, 2022
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.

2 participants