Display more explicit error if python-sqlite3 is not installed.

This commit is contained in:
Valentin Lorentz 2012-10-13 08:54:33 +00:00
parent 5ebbf2d516
commit 4d1a7ea32a

View File

@ -96,7 +96,12 @@ from supybot import commands
try: try:
import sqlite3 import sqlite3
except ImportError: 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): class NoSuitableDatabase(Exception):
def __init__(self, suitable): def __init__(self, suitable):