Here is the patch: it applies over the one for #736500 to prevent a
conflict in the changelog, please let me know if you would rather have 
it apply on master.
-- 
Elena ``of Valhalla''
From 76e8efba09d77eadb2c56810fe5f6fd6ce547780 Mon Sep 17 00:00:00 2001
From: Elena of Valhalla'' Grandi <valha...@trueelena.org>
Date: Sun, 17 Aug 2014 10:41:05 +0200
Subject: [PATCH] Don't traceback on missing index. Closes: #758403

---
 axi-cache        | 7 ++++++-
 debian/changelog | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/axi-cache b/axi-cache
index 0aaf212..235ee88 100755
--- a/axi-cache
+++ b/axi-cache
@@ -29,6 +29,7 @@ from optparse import OptionParser
 from cStringIO import StringIO
 import sys
 import os, os.path
+from xapian import DatabaseOpeningError
 import axi
 
 VERSION="0.46"
@@ -117,7 +118,11 @@ if not helponly:
 
         def __init__(self):
             # Access the Xapian index
-            self.db = xapian.Database(axi.XAPIANINDEX)
+            try:
+                self.db = xapian.Database(axi.XAPIANINDEX)
+            except DatabaseOpeningError:
+                print >>sys.stderr, "Index not available: please run update-apt-xapian-index" 
+                sys.exit(2)
 
             self.stem = xapian.Stem("english")
 
diff --git a/debian/changelog b/debian/changelog
index 0480c14..c4a02b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ apt-xapian-index (0.47) UNRELEASED; urgency=low
 
   [ Elena Grandi ]
   * Use defaults when values file is broken. Closes: #736500
+  * Don't traceback on missing index. Closes: #758403
 
  -- Enrico Zini <enr...@debian.org>  Sat, 17 Aug 2013 10:52:52 +0200
 
-- 
2.1.0.rc1

Attachment: signature.asc
Description: Digital signature

Reply via email to