clean up some module import code in fpdb_import

This commit is contained in:
Eric Blade 2009-09-15 20:10:18 -05:00
parent 8b19750b1f
commit d6c5309aa3

View File

@ -49,22 +49,20 @@ log = logging.getLogger('importer')
# database interface modules
try:
import MySQLdb
mysqlLibFound=True
log.debug("Import module: MySQLdb")
except:
log.debug("Import module: MySQLdb not found")
log.debug("Import database module: MySQLdb not found")
else:
mysqlLibFound = True
try:
import psycopg2
pgsqlLibFound=True
except:
log.debug("Import database module: psycopg2 not found")
else:
import psycopg2.extensions
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
log.debug("Import module: psycopg2")
except:
log.debug("Import module: psycopg2 not found")
class Importer:
def __init__(self, caller, settings, config, sql = None):
"""Constructor"""
self.settings = settings