#NEWLINE# def modify_user( self , username , data ) : #NEWLINE# #INDENT# " Modify user in SQLite database.\n\n            Since username is used as primary key and we only have a single\n            argument for it we can't modify the username right now.\n        " #NEWLINE# sql = 'UPDATE user SET ' #NEWLINE# sql += ', ' . join ( ( ( '%s = ?' % k ) for k in sorted ( data ) ) ) #NEWLINE# sql += ' WHERE username = ?' #NEWLINE# vals = [ ] #NEWLINE# for k in sorted ( data ) : #NEWLINE# #INDENT# vals . append ( username [ k ] ) #NEWLINE# #UNINDENT# vals . append ( username ) #NEWLINE# try : #NEWLINE# #INDENT# self . _db_curs . execute ( sql , vals ) #NEWLINE# self . _db_conn . commit ( ) #NEWLINE# #UNINDENT# except ( sqlite3 . OperationalError , sqlite3 . IntegrityError ) as error : #NEWLINE# #INDENT# raise AuthError ( error )