[HOTFIX] fix for unicode issue in supybot search #3341

Closed
opened 2012-06-14 00:28:30 +00:00 by toshio · 1 comment

= bug description =
supybot was tracebacking when a name with a unicode character was searched for via .fas. Applied the following to fix the traceback.

{{{
diff --git a/plugin.py b/plugin.py
index f3f5ac9..e8a7d00 100644
--- a/plugin.py
+++ b/plugin.py
@@ -45,6 +45,8 @@ from fedora.client.fas2 import AccountSystem
from fedora.client.fas2 import FASError
from fedora.client.pkgdb import PackageDB

+from kitchen.text.converters import to_unicode
+
import simplejson
import urllib
import commands
@@ -212,6 +214,7 @@ class Fedora(callbacks.Plugin):

     Search the Fedora Account System usernames, full names, and email
     addresses for a match."""
  •    find_name = to_unicode(find_name)
       matches = []
       for entry in self.faslist.keys():
           if entry.find(find_name.lower()) != -1:
    

}}}

Submitted a bug report upstream.

= bug description = supybot was tracebacking when a name with a unicode character was searched for via .fas. Applied the following to fix the traceback. {{{ diff --git a/plugin.py b/plugin.py index f3f5ac9..e8a7d00 100644 --- a/plugin.py +++ b/plugin.py @@ -45,6 +45,8 @@ from fedora.client.fas2 import AccountSystem from fedora.client.fas2 import FASError from fedora.client.pkgdb import PackageDB +from kitchen.text.converters import to_unicode + import simplejson import urllib import commands @@ -212,6 +214,7 @@ class Fedora(callbacks.Plugin): Search the Fedora Account System usernames, full names, and email addresses for a match.""" + find_name = to_unicode(find_name) matches = [] for entry in self.faslist.keys(): if entry.find(find_name.lower()) != -1: }}} Submitted a bug report upstream.
Owner

This has since been updated via packages. Hotfix no longer needed.

This has since been updated via packages. Hotfix no longer needed.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
infra/tickets#3341
No description provided.