launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25993
[Merge] ~cjwatson/launchpad:py3-openid-identity-url into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-openid-identity-url into launchpad:master.
Commit message:
Return text from openid_identity_url
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/396188
It's used to display text in the UI, so it shouldn't be bytes on Python 3.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-openid-identity-url into launchpad:master.
diff --git a/lib/lp/services/openid/adapters/openid.py b/lib/lp/services/openid/adapters/openid.py
index 13d8654..0d0c52d 100644
--- a/lib/lp/services/openid/adapters/openid.py
+++ b/lib/lp/services/openid/adapters/openid.py
@@ -10,6 +10,7 @@ __all__ = [
'OpenIDPersistentIdentity',
]
+import six
from zope.component import adapter
from zope.interface import implementer
@@ -55,8 +56,8 @@ class OpenIDPersistentIdentity:
if openid_identifier is None:
return None
return (
- config.launchpad.openid_provider_root +
- openid_identifier.encode('ascii'))
+ six.ensure_text(config.launchpad.openid_provider_root) +
+ openid_identifier)
@property
def openid_identifier(self):
diff --git a/lib/lp/testopenid/adapters/openid.py b/lib/lp/testopenid/adapters/openid.py
index 35b30e1..2e1383c 100644
--- a/lib/lp/testopenid/adapters/openid.py
+++ b/lib/lp/testopenid/adapters/openid.py
@@ -27,4 +27,4 @@ class TestOpenIDPersistentIdentity(OpenIDPersistentIdentity):
def openid_identity_url(self):
"""See `IOpenIDPersistentIdentity`."""
identity_root_url = allvhosts.configs['testopenid'].rooturl
- return identity_root_url + self.openid_identifier.encode('ascii')
+ return identity_root_url + self.openid_identifier