fix bugs found just by trying the existing test driver
authorDavid Blacka <david@blacka.com>
Tue, 15 Jul 2008 02:30:46 +0000 (22:30 -0400)
committerDavid Blacka <david@blacka.com>
Tue, 15 Jul 2008 02:30:46 +0000 (22:30 -0400)
rwhoisd/QueryProcessor.py

index 8725141..d867ea0 100644 (file)
@@ -224,7 +224,7 @@ class QueryProcessor:
         # otherwise, union the results from all the causes
         res = QueryResult()
         for clause in query.clauses:
-            res.extend(self.process_query_clause(clause), max)
+            res.extend(self.process_query_clause(clause))
             if max and len(res) >= max:
                 res.truncate(max)
                 break
@@ -248,7 +248,11 @@ class QueryProcessor:
         max = session.limit
         if max: max += 1
 
-        query_result = self.process_full_query(query, max)
+        try:
+            query_result = self.process_full_query(query, max)
+        except Rwhois.RwhoisError, x:
+            session.wfile.write(Rwhois.error_message(x))
+            return
 
         objects   = query_result.objects()
         referrals = query_result.referrals()