autocommit

This commit is contained in:
James Vasile 2011-12-01 09:31:10 -05:00
parent b38c93c399
commit df140feb52

View File

@ -10,13 +10,11 @@ class UserStore(UserStoreModule, sqlite_db):
def __init__(self): def __init__(self):
self.data_dir = cfg.users_dir self.data_dir = cfg.users_dir
self.db_file = cfg.user_db self.db_file = cfg.user_db
sqlite_db.__init__(self, self.db_file) sqlite_db.__init__(self, self.db_file, autocommit=True)
self.__enter__() self.__enter__()
def close(self): def close(self):
self.__exit__() self.__exit__()
#TODO: at exit, commit db
class UserStoreOld(): class UserStoreOld():
#class UserStore(UserStoreModule): #class UserStore(UserStoreModule):
"""The user storage is on disk. Rather than slurp the entire """The user storage is on disk. Rather than slurp the entire