Changeset 4902

Show
Ignore:
Timestamp:
09/03/08 14:29:59 (3 months ago)
Author:
tousigna
Message:

Fix for the trouble seen when dooing a database upgrade with sqlite3 backend of django.
The backend don't like to have active connection while dooing it's maintenance so the database is closed before dooing the critical step of syncronizing. This is a sqlite quirk that caused the exception : OperationalError?: SQL logic error or missing database

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bcfg2/src/lib/Server/Reports/updatefix.py

    r4889 r4902  
    9696        fresh = True 
    9797 
     98    # ensure database connection are close, so that the management can do it's job right     
     99    cursor.close() 
     100    connection.close() 
     101    # Do the syncdb according to the django version 
    98102    if "call_command" in dir(django.core.management): 
    99103        # this is available since django 1.0 alpha.