Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/olpc/datastore/converter.py1
-rw-r--r--src/olpc/datastore/xapianindex.py3
-rw-r--r--tests/test_model.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/olpc/datastore/converter.py b/src/olpc/datastore/converter.py
index 75f7568..730613a 100644
--- a/src/olpc/datastore/converter.py
+++ b/src/olpc/datastore/converter.py
@@ -64,6 +64,7 @@ class subprocessconverter(object):
def __call__(self, filename):
data = {}
+
data['source'] = filename
if self.require_target:
# XXX: methods that return something bad here
diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py
index 4aa4632..f8a26b4 100644
--- a/src/olpc/datastore/xapianindex.py
+++ b/src/olpc/datastore/xapianindex.py
@@ -193,7 +193,6 @@ class IndexManager(object):
with self._write_lock:
for item in data:
uid, vid, doc, operation, filestuff = item
-
if operation is DELETE:
self.write_index.delete(uid)
logger.info("deleted content %s" % (uid,))
@@ -215,7 +214,7 @@ class IndexManager(object):
" indexing at %s. Not"
" Found" % filename)
- fp = converter(filename, mimetype)
+ fp = converter(filename, mimetype=mimetype)
if fp:
# read in at a fixed block size, try to
# conserve memory. If this doesn't work
diff --git a/tests/test_model.py b/tests/test_model.py
index 6d171c1..5de0b45 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -6,6 +6,8 @@ from olpc.datastore import model, backingstore
import datetime
import os
+import logging
+logging.basicConfig()
DEFAULT_STORE = '/tmp/test_ds'