server/__init__.py
changeset 2381 caad2367d940
parent 2181 94ca417b9b07
parent 2306 95da5d9f0870
child 2458 4d114865098f
equal deleted inserted replaced
2374:ea1a44e4ad62 2381:caad2367d940
    48     print 'creating necessary tables into the system source'
    48     print 'creating necessary tables into the system source'
    49     source = sourcescfg['system']
    49     source = sourcescfg['system']
    50     driver = source['db-driver']
    50     driver = source['db-driver']
    51     sqlcnx = repo.system_source.get_connection()
    51     sqlcnx = repo.system_source.get_connection()
    52     sqlcursor = sqlcnx.cursor()
    52     sqlcursor = sqlcnx.cursor()
    53     def execute(sql, args=None):
    53     execute = sqlcursor.execute
    54         repo.system_source.doexec(sqlcursor, sql, args)
       
    55     if drop:
    54     if drop:
    56         dropsql = sqldropschema(schema, driver)
    55         dropsql = sqldropschema(schema, driver)
    57         try:
    56         try:
    58             sqlexec(dropsql, execute)
    57             sqlexec(dropsql, execute)
    59         except Exception, ex:
    58         except Exception, ex: