summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2010-11-24 21:14:19 +0100
committeryvesf <yvesf-git@xapek.org>2010-11-24 21:14:19 +0100
commit35efef41d80413481167f9a3ec779a85c7800e4b (patch)
treeb4ba5ed6e4cf8afc36c8555777f36dc85103ca88
parentcc80a271ba5b2b11a2c92883fbf5734fd3420aca (diff)
downloadbooksearch-35efef41d80413481167f9a3ec779a85c7800e4b.tar.gz
booksearch-35efef41d80413481167f9a3ec779a85c7800e4b.zip
catch missing multiprocessing importerror
-rw-r--r--indexer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indexer.py b/indexer.py
index 8ab4cdf..3f1ecd6 100644
--- a/indexer.py
+++ b/indexer.py
@@ -7,7 +7,6 @@ import pyPdf
import whoosh.index as index
import whoosh.writing as writing
import whoosh.fields as fields
-import multiprocessing as mp
schema_book = fields.Schema(
pagenumber=fields.NUMERIC(stored=True),
@@ -97,6 +96,7 @@ def process_file(filepath):
print u"{0} failed at {1}: {2}".format(os.getpid(), filepath, e)
try:
+ import multiprocessing as mp
pool = mp.Pool()
jobs = []
for filepath in filepaths: