changeset 17:cabe97535057

py3
author Jeff Hammel <k0scist@gmail.com>
date Tue, 24 Nov 2020 13:15:33 -0800
parents d0ad67182478
children 87990e313a91
files toolbox/search.py
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/toolbox/search.py	Tue Nov 24 13:14:27 2020 -0800
+++ b/toolbox/search.py	Tue Nov 24 13:15:33 2020 -0800
@@ -52,16 +52,10 @@
             if key not in self.keywords:
                 writer.add_field(key, fields.KEYWORD)
                 self.keywords.add(key)
-            if not isinstance(kw[key], basestring):
+            if not isinstance(kw[key], str):
                 kw[key] = ' '.join(kw[key])
             kw[key] = unicode(kw[key])
 
-        # convert to unicode for whoosh
-        # really whoosh should do this for us
-        # and really python should be unicode-based :(
-        name = unicode(name)
-        description = unicode(description)
-
         writer.update_document(name=name, description=description, **kw)
         writer.commit()