def sendEvent(self, event):
        try:
            value = simplejson.dumps(event)
        except (__HOLE__, ValueError):
            log.err(None, "Could not encode event to JSON")
            return

        try:
            d = self.client.lpush(self.key, value)
        except:
            log.err()
        d.addErrback(lambda failure: failure.trap(NoClientError))
        d.addErrback(log.err)
dataset/ETHPy150Open mochi/udplog/udplog/redis.py/RedisPublisher.sendEvent