mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
PEP8 fixes
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
# coding: utf-8
|
||||
from django.db import connection
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import connection
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from modoboa.lib.exceptions import InternalError
|
||||
|
||||
|
||||
@@ -33,7 +35,8 @@ def db_type(cname="default"):
|
||||
:return: a string or None
|
||||
"""
|
||||
if not cname in settings.DATABASES:
|
||||
raise InternalError(_("Connection to database %s not configured" % cname))
|
||||
raise InternalError(
|
||||
_("Connection to database %s not configured" % cname))
|
||||
for t in ['postgres', 'mysql', 'sqlite']:
|
||||
if settings.DATABASES[cname]['ENGINE'].find(t) != -1:
|
||||
return t
|
||||
|
||||
Reference in New Issue
Block a user