1. Alex Willmer
  2. trac-ticketlinks

Commits

jonas  committed 61d35ce

Modified the search module work work with python2.1

  • Participants
  • Parent commits c6519ba
  • Branches trunk

Comments (0)

Files changed (1)

File svntrac/Search.py

View file
  • Ignore whitespace
     def query_to_sql(self, query, name):
         query = query.replace('\'', '\'\'\'\'')
         keywords = query.split(' ')
-        x = map(lambda x: name + ' LIKE \'%' + x + '%\'', keywords)
+        # The line below doesn't work in python2.1
+        # x = map(lambda x: name + ' LIKE \'%' + x + '%\'', keywords)
+        x = []
+        for keyword in keywords:
+            x.append(name + ' LIKE \'%' + keyword + '%\'')
         return string.join(x, ' AND ')
     
     def perform_query (self, query, changeset, tickets):