changeset 2235:fcb18262e270

Simplify some code in the query parser.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Mon, 04 Jun 2007 17:35:42 +0200
parents b39475e79845
children ee8beeddd28d
files MoinMoin/search/queryparser.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/queryparser.py	Thu Jun 21 09:42:32 2007 +0200
+++ b/MoinMoin/search/queryparser.py	Mon Jun 04 17:35:42 2007 +0200
@@ -387,10 +387,7 @@
         """ Page filter function for single title search """
         def filter(name):
             match = self.search_re.search(name)
-            if ((self.negated and match) or
-                (not self.negated and not match)):
-                return False
-            return True
+            return bool(self.negated) ^ bool(match)
         return filter
 
     def search(self, page):