changeset 3034:2739e3150e40 maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Mon, 03 Jan 2005 03:24:48 +0000
parents 42f5d0cebcce
children 714f2a60a97e
files CHANGES.txt roundup/backends/indexer_rdbms.py test/db_test_base.py
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Mon Jan 03 03:17:48 2005 +0000
+++ b/CHANGES.txt	Mon Jan 03 03:24:48 2005 +0000
@@ -69,6 +69,7 @@
 - fix some security assertions (sf bug 1085481)
 - don't set the title to nothing from incoming mail (thanks Bruce Guenter)
 - fix py2.4 strftime() API change bug (sf bug 1087746)
+- fix indexer searching with no valid words (sf bug 1086787)
 
 
 2004-10-26 0.7.9
--- a/roundup/backends/indexer_rdbms.py	Mon Jan 03 03:17:48 2005 +0000
+++ b/roundup/backends/indexer_rdbms.py	Mon Jan 03 03:24:48 2005 +0000
@@ -74,6 +74,9 @@
         If none are found return an empty dictionary
         * more rules here
         '''        
+        if not wordlist:
+            return {}
+
         l = [word.upper() for word in wordlist if 26 > len(word) > 2]
 
         a = ','.join([self.db.arg] * len(l))
--- a/test/db_test_base.py	Mon Jan 03 03:17:48 2005 +0000
+++ b/test/db_test_base.py	Mon Jan 03 03:24:48 2005 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-# $Id: db_test_base.py,v 1.55 2004-11-26 00:01:04 richard Exp $
+# $Id: db_test_base.py,v 1.55.2.1 2005-01-03 03:23:38 richard Exp $
 
 import unittest, os, shutil, errno, imp, sys, time, pprint
 
@@ -698,6 +698,7 @@
         i1 = self.db.issue.create(files=[f1, f2], title="flebble plop")
         i2 = self.db.issue.create(title="flebble the frooz")
         self.db.commit()
+        self.assertEquals(self.db.indexer.search([], self.db.issue), {})
         self.assertEquals(self.db.indexer.search(['hello'], self.db.issue),
             {i1: {'files': [f1]}})
         self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {})

Roundup Issue Tracker: http://roundup-tracker.org/