From b7bfd64bc419deb01921f1c3cba01e23a2e8fcd5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 17 Jan 2014 19:15:28 +0000 Subject: [PATCH] User: Fix GPG auth on Python 3. Closes GH-541. Closes GH-542. --- plugins/User/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/User/plugin.py b/plugins/User/plugin.py index daf415e58..588cd36c0 100644 --- a/plugins/User/plugin.py +++ b/plugins/User/plugin.py @@ -490,7 +490,10 @@ class User(callbacks.Plugin): Check the GPG signature at the and authenticates you if the key used is associated to a user.""" self._expire_tokens() - match = self._auth_re.search(utils.web.getUrl(url)) + content = utils.web.getUrl(url) + if sys.version_info[0] >= 3 and isinstance(content, bytes): + content = content.decode() + match = self._auth_re.search(content) if not match: irc.error(_('Signature or token not found.'), Raise=True) data = match.group(0)