def __clear_buffers(self):
        """Clears the input and output buffers"""
        try:
            self._port.reset_input_buffer()
            self._port.reset_output_buffer()
        except __HOLE__:
            #pySerial 2.7
            self._port.flushInput()
            self._port.flushOutput()
dataset/ETHPy150Open kmpm/nodemcu-uploader/nodemcu_uploader/uploader.py/Uploader.__clear_buffers