'Prepare exception for serialization.'

def prepare_exception(self, exc, serializer=None):

    serializer = (self.serializer if (serializer is None) else serializer)
    if (serializer in EXCEPTION_ABLE_CODECS):
        return get_pickleable_exception(exc)
    return {u'exc_type': type(exc).__name__, u'exc_message': exc.args, u'exc_module': type(exc).__module__}
