#NEWLINE# def save( self , must_create = False ) : #NEWLINE# #INDENT# "\n        Saves the current session data to the database. If 'must_create' is\n        True, a database error will be raised if the saving operation doesn't\n        create a *new* entry (as opposed to possibly updating an existing\n        entry).\n        " #NEWLINE# obj = Session ( session_key = self . session_key , session_data = self . encode ( self . _get_session ( no_load = obj ) ) , expire_date = self . get_expiry_date ( ) ) #NEWLINE# sid = transaction . savepoint ( ) #NEWLINE# try : #NEWLINE# #INDENT# obj . save ( force_insert = must_create ) #NEWLINE# #UNINDENT# except IntegrityError : #NEWLINE# #INDENT# if must_create : #NEWLINE# #INDENT# transaction . savepoint_rollback ( sid ) #NEWLINE# raise CreateError #NEWLINE# #UNINDENT# raise