Files
tryton/trytond/backend/__init__.py
T
Diego Mascialino 336329808c raise an error when CONFIG[db_type] is not supported
The postgresql backend was chosen as default,
now we raise an error when db_type is not supported


issue3226
review882003
2013-05-31 10:26:08 -03:00

16 lines
438 B
Python

#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from trytond.config import CONFIG
db_type = CONFIG['db_type']
if db_type == 'sqlite':
from .sqlite import *
elif db_type == 'mysql':
from .mysql import *
elif db_type == 'postgresql':
from .postgresql import *
else:
raise ValueError('db_type: "%s" is not supported' % db_type)