Changeset 3515

Show
Ignore:
Timestamp:
04/14/08 16:46:08 (5 months ago)
Author:
pacopablo
Message:

Added explicit commit() calls to keep the transaction from aborting. Fixes #2885

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • accountmanagerplugin/0.10/acct_mgr/db.py

    r2120 r3515  
    5656                       "AND sid=%s", (hash, user)) 
    5757        if cursor.rowcount > 0: 
     58            db.commit() 
    5859            return False # updated existing password 
    5960        cursor.execute("INSERT INTO session_attribute " 
     
    6162                       "VALUES (%s,1,'password',%s)", 
    6263                       (user, hash)) 
     64        db.commit() 
    6365        return True 
    6466 
     
    8890        # TODO cursor.rowcount doesn't seem to get # deleted 
    8991        # is there another way to get count instead of using has_user? 
     92        db.commit() 
    9093        return True 
  • accountmanagerplugin/trunk/acct_mgr/db.py

    r2127 r3515  
    5656                       "AND sid=%s", (hash, user)) 
    5757        if cursor.rowcount > 0: 
     58            db.commit() 
    5859            return False # updated existing password 
    5960        cursor.execute("INSERT INTO session_attribute " 
     
    6162                       "VALUES (%s,1,'password',%s)", 
    6263                       (user, hash)) 
     64        db.commit() 
    6365        return True 
    6466 
     
    8890        # TODO cursor.rowcount doesn't seem to get # deleted 
    8991        # is there another way to get count instead of using has_user? 
     92        db.commit() 
    9093        return True