#NEWLINE# def getTokens( self , medium , address ) : #NEWLINE# #INDENT# cur = self . sydent . db . cursor ( ) #NEWLINE# res = cur . execute ( 'SELECT medium, address, room_id, sender, token FROM invite_tokens WHERE medium = ? AND address = ?' , ( medium , address ) ) #NEWLINE# rows = res . fetchall ( ) #NEWLINE# ret = [ ] #NEWLINE# for row in cur : #NEWLINE# #INDENT# ( medium , address , roomId , sender , token ) = row #NEWLINE# ret . append ( { #NEWLINE# #INDENT# 'medium' : medium , #NEWLINE# 'address' : address , #NEWLINE# 'room_id' : roomId , #NEWLINE# 'sender' : sender , #NEWLINE# 'token' : token , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return ret