def load_databag(filename):
    try:
        if filename.endswith('.json'):
            with open(filename, 'r') as f:
                return json.load(f, object_pairs_hook=OrderedDict)
        elif filename.endswith('.ini'):
            return decode_flat_data(IniFile(filename).items(),
                                    dict_cls=OrderedDict)
    except (OSError, __HOLE__) as e:
        if e.errno != errno.ENOENT:
            raise
dataset/ETHPy150Open lektor/lektor-archive/lektor/databags.py/load_databag