def _state_listener(self, state):
        logger.error(state % "Connection state change: %s")
        if state == KazooState.SUSPENDED:
            logger.warn("Suspended connection, setting connected to False.")
            self.conn.connected = False
        elif state == KazooState.LOST:
            logger.warn("Lost connection, setting lost to True.")
            self.conn.lost = True
            self.conn.zk.handler.spawn(self._rejoin_party)
        elif state == KazooState.CONNECTED:
            logger.warn("Regained connection, setting connected to True.")
            self.conn.connected = True
            self.conn.zk.handler.spawn(self._rejoin_party)
dataset/ETHPy150Open facebookarchive/neti/neti/registry.py/Registry._state_listener/swapped operands of `%`