def close(self):
        self.sync()
        try:
            self.dict.close()
        except __HOLE__:
            pass
        # Catch errors that may happen when close is called from __del__
        # because CPython is in interpreter shutdown.
        try:
            self.dict = _ClosedDict()
        except (NameError, TypeError):
            self.dict = None
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/shelve.py/Shelf.close