Commit c36b585d authored by Vincent Pelletier's avatar Vincent Pelletier

Register MySQL back-end conditionally.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2450 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f04acd36
......@@ -17,11 +17,18 @@
from neo.exception import DatabaseFailure
from neo.storage.database.manager import DatabaseManager
from neo.storage.database.mysqldb import MySQLDatabaseManager
DATABASE_MANAGER_DICT = {
'MySQL': MySQLDatabaseManager,
}
DATABASE_MANAGER_DICT = {}
try:
from neo.storage.database.mysqldb import MySQLDatabaseManager
except ImportError:
pass
else:
DATABASE_MANAGER_DICT['MySQL'] = MySQLDatabaseManager
if not DATABASE_MANAGER_DICT:
raise ImportError('No database back-end available.')
def buildDatabaseManager(name, config):
if name is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment