def handle(self, data, address):
        self.logger.info("Recieved new command {}".format(data))
        parts = data.split(" ")
        try:
            component = self.components[parts[0]]
            func = getattr(component, parts[1])
            kwargs = {}
            args = []
            for arg in parts[2:]:
                if "=" in arg:
                    k, v = arg.split("=", 1)
                    kwargs[k] = v
                else:
                    args.append(arg)
            if kwargs.pop('__spawn', False):
                gevent.spawn(func, *args, **kwargs)
            else:
                func(*args, **kwargs)
        except __HOLE__:
            self.logger.warn("Component {} doesn't have a method {}"
                             .format(*parts))
        except KeyError:
            self.logger.warn("Component {} doesn't exist".format(*parts))
        except Exception:
            self.logger.warn("Error in called function {}!".format(data),
                             exc_info=True)
dataset/ETHPy150Open simplecrypto/powerpool/powerpool/main.py/PowerPool.handle