def _update(self):
        self._index = {}
        try:
            f = _open(self._dirfile)
        except __HOLE__:
            pass
        else:
            for line in f:
                line = line.rstrip()
                key, pos_and_siz_pair = eval(line)
                self._index[key] = pos_and_siz_pair
            f.close()

    # Write the index dict to the directory file.  The original directory
    # file (if any) is renamed with a .bak extension first.  If a .bak
    # file currently exists, it's deleted.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/dumbdbm.py/_Database._update