A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-July/154807.html below:

[Python-Dev] Tests failing on Windows with TESTFN

[Python-Dev] Tests failing on Windows with TESTFN [Python-Dev] Tests failing on Windows with TESTFNeryk sun eryksun at gmail.com
Sun Jul 29 10:54:39 EDT 2018
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.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4