diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-08-17 19:35:14 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-08-17 19:35:14 (GMT) |
commit | 2fe11309a17c50fcb5b89c54ca1beb6d322e6978 (patch) | |
tree | f19f108dea4e1f8f4027a21385e306ace96fa194 | |
parent | f46f5fb5a7e88ec81a08aa1c115ef1096acf4a04 (diff) |
assorted nitpicks
-rw-r--r-- | src/carquinyol/indexstore.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/carquinyol/indexstore.py b/src/carquinyol/indexstore.py index 7b620b5..06a41e0 100644 --- a/src/carquinyol/indexstore.py +++ b/src/carquinyol/indexstore.py @@ -66,7 +66,7 @@ class TermGenerator (xapian.TermGenerator): document.add_value(_VALUE_TIMESTAMP, str(properties['timestamp'])) document.add_value(_VALUE_TITLE, properties.get('title', '').strip()) - xapian.TermGenerator.set_document(self, document) + self.set_document(document) properties = dict(properties) self._index_known(document, properties) @@ -171,7 +171,7 @@ class QueryParser (xapian.QueryParser): '') except xapian.QueryParserError, exception: - logging.warning('Invalid query string: '+exception.get_msg()) + logging.warning('Invalid query string: ' + exception.get_msg()) return Query() def parse_query(self, query_dict, query_string): @@ -179,7 +179,7 @@ class QueryParser (xapian.QueryParser): queries = [] query_dict = dict(query_dict) - if query_string: + if query_string is not None: queries.append(self._parse_query_xapian(str(query_string))) for name, value in query_dict.items(): |