def _local_websocket(self):
    """Connect to local websocket server."""
    self._websocket_connection = websocket.create_connection(
        "ws://localhost:%d/" % simple_pusher.WEBSOCKET_PORT)
    request = json.dumps({'channel': self._proxy_id % 'private-%s'})
    self._websocket_connection.send(request)

    while True:
      result = self._websocket_connection.recv()
      self._callback_handler(result)
dataset/ETHPy150Open tomwilkie/awesomation/src/pi/pushrpc.py/PushRPC._local_websocket/swapped operands of `%`