[Python-Dev] Tests failing on Windows with TESTFN
eryk sun
eryksun at gmail.com
Sun Jul 29 10:54:39 EDT 2018
More information about the Python-Dev mailing list
Sun Jul 29 10:54:39 EDT 2018
- Previous message (by thread): [Python-Dev] Tests failing on Windows with TESTFN
- Next message (by thread): [Python-Dev] Tests failing on Windows with TESTFN
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jul 29, 2018 at 2:21 PM, Jeremy Kloth <jeremy.kloth at gmail.com> wrote: > > try: > os.rename(new_file.name, self._path) > except FileExistsError: > - os.remove(self._path) > + temp_name = _create_temporary_name(self._path) > + os.rename(self._path, temp_name) > os.rename(new_file.name, self._path) > + os.remove(temp_name) This should call os.replace to allow the file system to replace the existing file.
- Previous message (by thread): [Python-Dev] Tests failing on Windows with TESTFN
- Next message (by thread): [Python-Dev] Tests failing on Windows with TESTFN
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list