def load_content(file_path):
    """
    Loads content from file_path if file_path's extension
    is one of allowed ones (See ALLOWED_EXTS).
    Throws UnsupportedMetaException on disallowed filetypes.
    :param file_path: Absolute path to the file to load content from.
    :type file_path: ``str``
    :rtype: ``dict``
    """
    file_name, file_ext = os.path.splitext(file_path)

    if ALLOWED_EXTS not in file_ext:
        raise Exception('Unsupported meta type %s, file %s. Allowed: %s' %
                        (file_ext, file_path, ALLOWED_EXTS))

    parser_func = PARSER_FUNCS.get(file_ext, None)

    with open(file_path, 'r') as fd:
        return parser_func(fd) if parser_func else fd.read()
dataset/ETHPy150Open StackStorm/st2/st2client/tests/fixtures/loader.py/load_content/swapped operands of `not in`