''

def _check_ready(self):

    try:
        self.ser.open()
    except serial.SerialException:
        self.ser = serial.Serial()
        self.ser.port = self._port
        self.ser.baudrate = self._baudrate
        try:
            self.ser.open()
        except serial.SerialException:
            self._is_ready = False
        else:
            self._is_ready = True
    else:
        self._is_ready = True
