Merge lp:~leonardr/launchpadlib/bug-712808 into lp:launchpadlib
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | 115 |
Merged at revision: | 113 |
Proposed branch: | lp:~leonardr/launchpadlib/bug-712808 |
Merge into: | lp:launchpadlib |
Diff against target: |
131 lines (+42/-37) 3 files modified
src/launchpadlib/NEWS.txt (+7/-0) src/launchpadlib/__init__.py (+1/-1) src/launchpadlib/launchpad.py (+34/-36) |
To merge this branch: | bzr merge lp:~leonardr/launchpadlib/bug-712808 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+48830@code.launchpad.net |
Description of the change
This branch fixes bug 712808 by changing launchpadlib's behavior when consumer_name is specified as a string. The previous behavior was to treat consumer_name as an OAuth consumer, but to try to do a desktop-wide integration. This is internally inconsistent-
This code can't be tested normally, but it's easy to test manually, by running this code when you have no active credential on staging.
Launchpad.
I noticed another problem: get_token_ and_login( ) works, and it stores credentials in the keyring, but it doesn't _read_ credentials from the keyring the second time you run the code, because the code to look in the keyring was in login_with(). I moved that code to _authorize_ token_and_ login, which is called by all code paths, and now get_token_ and_login( ) works just as well as login_with().