@classmethod
  def configure(cls):
    if options.debug:
      import traceback
      def log_error(self, e): 
        logging.error((traceback.format_exc(), repr(self.request.headers)) % '%s\nHeaders: %s\n')
      cls.log_error = log_error
    open_function = options.socket_opened_method and options.socket_opened_method.rsplit('.', 1)
    cls._on_open = open_function and getattr(__import__(open_function[0]), open_function[1]) or None
    closed_function = options.socket_closed_method and options.socket_closed_method.rsplit('.', 1)
    cls._on_close = closed_function and getattr(__import__(closed_function[0]), closed_function[1]) or None
    cls.__method = __import__(options.socket_method_module)
dataset/ETHPy150Open JeremyOT/Toto/toto/sockets.py/TotoSocketHandler.configure/swapped operands of `%`