def abort(self):
        try:
            if os.name == "nt":
                # Note: Windows can't remove an open file, so sacrifice some
                # safety and close it before deleting it here. This is only a
                # problem if ``.close()`` raises an exception, which it really
                # shouldn't... But it's probably a better idea to be safe.
                self.file.close()
            os.remove(self.temp_name)
        except __HOLE__ as e:
            self.abort_error = e
        self.file.close()
        self.closed = True
        self.aborted = True
dataset/ETHPy150Open shazow/unstdlib.py/unstdlib/standard/contextlib_.py/open_atomic.abort