Merge ~cjwatson/launchpad:py3-CanonicalSSOAPI into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: d8b5cc8cd3769edc5b0dc94b91aa96d3eaa78c3c
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:py3-CanonicalSSOAPI
Merge into: launchpad:master
Diff against target: 22 lines (+2/-2)
1 file modified
lib/lp/registry/xmlrpc/canonicalsso.py (+2/-2)
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+398989@code.launchpad.net

Commit message

Fix CanonicalSSOAPI for Python 3

Description of the change

On Python 3, `openid_identifier` is typically already text.

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/xmlrpc/canonicalsso.py b/lib/lp/registry/xmlrpc/canonicalsso.py
2index c202ffa..9aa5c79 100644
3--- a/lib/lp/registry/xmlrpc/canonicalsso.py
4+++ b/lib/lp/registry/xmlrpc/canonicalsso.py
5@@ -9,7 +9,7 @@ __all__ = [
6 'CanonicalSSOApplication',
7 ]
8
9-
10+import six
11 from zope.component import getUtility
12 from zope.interface import implementer
13 from zope.security.proxy import removeSecurityProxy
14@@ -30,7 +30,7 @@ class CanonicalSSOAPI(LaunchpadXMLRPCView):
15 def getPersonDetailsByOpenIDIdentifier(self, openid_identifier):
16 try:
17 account = getUtility(IAccountSet).getByOpenIDIdentifier(
18- openid_identifier.decode('ascii'))
19+ six.ensure_text(openid_identifier, 'ascii'))
20 except LookupError:
21 return None
22 person = IPerson(account, None)

Subscribers

People subscribed via source and target branches

to status/vote changes: