From 4d1a7ea32a8bf5f16da8d5df25ce98e521731256 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 13 Oct 2012 08:54:33 +0000 Subject: [PATCH] Display more explicit error if python-sqlite3 is not installed. --- plugins/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index 2eb65a48c..1cbb4308b 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -96,7 +96,12 @@ from supybot import commands try: import sqlite3 except ImportError: - from pysqlite2 import dbapi2 as sqlite3 # for python2.4 + raise ImportError('Cannot find sqlite3 module. If you are seeing this ' + 'message, it means you are running a non-standard Python ' + 'distribution that has not been compiled with sqlite3 support. ' + 'Please recompile it with sqlite3 support or report a bug to ' + 'the maintainer of the python package of your distribution.') + class NoSuitableDatabase(Exception): def __init__(self, suitable):