def dist(a, b):
    return sum((i-j)**2 for i, j in zip(a, b))
def forceCloseCliConnectionTo(self):
        self.modeList = None
        if self._connection:
            self._debugLog("Closing connection.")
            self._connection.close()
        self._connection = None