launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25851
[Merge] ~cjwatson/launchpad:py3-sshkeyset-new into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-sshkeyset-new into launchpad:master.
Commit message:
Fix SSHKeySet.new on Python 3
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/395291
We need to pass bytes to Key.fromString.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-sshkeyset-new into launchpad:master.
diff --git a/lib/lp/registry/model/person.py b/lib/lp/registry/model/person.py
index e1406ca..9834a0a 100644
--- a/lib/lp/registry/model/person.py
+++ b/lib/lp/registry/model/person.py
@@ -4131,7 +4131,7 @@ class SSHKeySet:
if check_key:
try:
- key = Key.fromString(sshkey)
+ key = Key.fromString(sshkey.encode("UTF-8"))
except Exception as e:
raise SSHKeyAdditionError(key=sshkey, exception=e)
if kind != key.sshType():