cubicweb/server/__init__.py
changeset 12957 0c973204033a
parent 12716 f5300acd8f4f
equal deleted inserted replaced
12931:6eae252361e5 12957:0c973204033a
   251         failed = sqlexec(schemasql, execute, pbtitle=_title)
   251         failed = sqlexec(schemasql, execute, pbtitle=_title)
   252         if failed:
   252         if failed:
   253             print('The following SQL statements failed. You should check your schema.')
   253             print('The following SQL statements failed. You should check your schema.')
   254             print(failed)
   254             print(failed)
   255             raise Exception('execution of the sql schema failed, you should check your schema')
   255             raise Exception('execution of the sql schema failed, you should check your schema')
   256         sqlcursor.close()
       
   257         sqlcnx.commit()
   256         sqlcnx.commit()
   258     with repo.internal_cnx() as cnx:
   257     with repo.internal_cnx() as cnx:
   259         # insert entity representing the system source
   258         # insert entity representing the system source
   260         ssource = cnx.create_entity('CWSource', type=u'native', name=u'system')
   259         ssource = cnx.create_entity('CWSource', type=u'native', name=u'system')
   261         repo.system_source.eid = ssource.eid
   260         repo.system_source.eid = ssource.eid