Skip to content

Commit 89f51d0

Browse files
committed
Aka: Improve warning message when sqlite3 is not available.
1 parent 85c4462 commit 89f51d0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

plugins/Aka/plugin.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,15 @@ def findBiggestAt(alias):
356356
if 'sqlite3' in conf.supybot.databases() and 'sqlite3' in available_db:
357357
AkaDB = SQLiteAkaDB
358358
elif 'sqlalchemy' in conf.supybot.databases() and 'sqlalchemy' in available_db:
359-
log.warning('Aka\'s only enabled database engine is SQLAlchemy, which '
360-
'is deprecated. Please consider adding \'sqlite3\' to '
361-
'supybot.databases (and/or install sqlite3).')
359+
if 'sqlite3' not in available_db:
360+
log.warning("Python's sqlite3 module is missing so Aka probably will "
361+
"not be able to access its database. "
362+
"If you compiled Python yourself (eg. via pyenv), try "
363+
"installing libsqlite3-dev and recompiling Python.")
364+
else:
365+
log.warning('Aka\'s only enabled database engine is SQLAlchemy, which '
366+
'is deprecated. Please consider adding \'sqlite3\' to '
367+
'supybot.databases (and/or install sqlite3).')
362368
AkaDB = SqlAlchemyAkaDB
363369
else:
364370
raise plugins.NoSuitableDatabase(['sqlite3', 'sqlalchemy'])

0 commit comments

Comments
 (0)