@get('/kite/<user>/mail')
@with_valid_token
def index(user):
            try:
                threads_index = DatetimeCabinet("/home/kite/threads.db")
            except IOError:
                abort(500, "Invalid thread")
                return

            ret_threads = []
            try:
                threads = threads_index[user]["threads_index"]
            except __HOLE__:
                threads = []
             
            for thread in threads:
                ret_threads.append(thread)

            response.content_type = "application/json"
            return serialize_json(ret_threads, protection=False)
dataset/ETHPy150Open khamidou/kite/src/back/kite/server.py/index