Merge lp:~xnox/launchpadlib/fix-1471927 into lp:launchpadlib

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 152
Proposed branch: lp:~xnox/launchpadlib/fix-1471927
Merge into: lp:launchpadlib
Diff against target: 12 lines (+2/-0)
1 file modified
src/launchpadlib/credentials.py (+2/-0)
To merge this branch: bzr merge lp:~xnox/launchpadlib/fix-1471927
Reviewer Review Type Date Requested Status
Zygmunt Krynicki Pending
LAZR Developers Pending
Review via email: mp+264480@code.launchpad.net

Description of the change

Make sure query_string is always string.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/launchpadlib/credentials.py'
2--- src/launchpadlib/credentials.py 2015-07-10 13:35:51 +0000
3+++ src/launchpadlib/credentials.py 2015-07-11 19:11:15 +0000
4@@ -248,6 +248,8 @@
5 @classmethod
6 def from_string(cls, query_string):
7 """Create and return a new `AccessToken` from the given string."""
8+ if not isinstance(query_string, str):
9+ query_string = query_string.decode('utf-8')
10 params = cgi.parse_qs(query_string, keep_blank_values=False)
11 key = params['oauth_token']
12 assert len(key) == 1, (

Subscribers

People subscribed via source and target branches