Merge lp://staging/~zyga/launchpadlib/fix-1471927 into lp://staging/launchpadlib
Proposed by
Zygmunt Krynicki
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Colin Watson | ||||
Proposed branch: | lp://staging/~zyga/launchpadlib/fix-1471927 | ||||
Merge into: | lp://staging/launchpadlib | ||||
Diff against target: |
15 lines (+5/-0) 1 file modified
src/launchpadlib/credentials.py (+5/-0) |
||||
To merge this branch: | bzr merge lp://staging/~zyga/launchpadlib/fix-1471927 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson | Needs Fixing | ||
Review via email:
|
To post a comment you must log in.
Unmerged revisions
- 141. By Zygmunt Krynicki
-
Fix AccessToken.
from_string( ) crash on python3 This patch fixes a backtrace that happens when the non-anonymous login
API is used and the user doesn't have a pre-cached credentials.Fixes: https:/
/bugs.launchpad .net/launchpadl ib/+bug/ 1471927
Signed-off-by: Zygmunt Krynicki <email address hidden>
You say that this is ensuring that it's not unicode on Python 2, but if you pass unicode in then it will try to decode it and (depending on the contents) either crash or leave it as unicode. Either way it's a bit inconsistent with the comment.
I haven't looked at the context further down, but can you just decode if it's bytes and drop the not str condition? You'll get unicode on Python 2, but it should tolerate that fine here; and it would be simpler code requiring a simpler comment (or probably none at all).