def _process_source(source):
    split = source.split('://')
    schema = split[0]
    the_rest = ''.join(split[1:])

    try:
        if ['http', 'https'] in schema:
            return requests.get(source).text
        elif schema == 'file' and the_rest:
            with open(the_rest) as f:
                return f.read()
    except IOError, e:
        raise NonRecoverableError('Failed processing source: {} ({})'
                                  .format(source, e.message))

    try:
        # try downloading blueprint resource
        return ctx.get_resource(source)
    except HttpException:
        pass
    try:
        # try downloading cloudify resource
        return get_resource_from_manager(source)
    except HttpException:
        pass
    raise NonRecoverableError('Failed processing source: {}'
                              .format(source))
dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/plugins/riemann-controller/riemann_controller/tasks.py/_process_source/swapped operands of `in`