

def _loop_work(self):
    import codecs
    with codecs.open(self.filepath, 'a+', 'utf-8') as record_file:
        while True:
            task = self._queue.get()
            LOG.debug('receive task %s', task)
            if (task is None):
                record_file.close()
                return
            self._formatter.write_record(record_file, task[0], task[1])
            self.flush()
            LOG.debug('writen task %s', task)

dataset/ETHPy150Open jjyr/zerotest/zerotest/record/http_recorder.py HTTPRecorder._loop_work/VarMisuse@92/120 `record_file`->`self`