mirror of https://github.com/python/cpython.git
bpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684) (GH-25688)
Fix test_logging.test_namer_rotator_inheritance() on Windows: use
os.replace() rather than os.rename().
(cherry picked from commit fe52eb6219
)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
2dc6b1789e
commit
629ef0fb9c
|
@ -5102,7 +5102,7 @@ def namer(self, name):
|
|||
|
||||
def rotator(self, source, dest):
|
||||
if os.path.exists(source):
|
||||
os.rename(source, dest + ".rotated")
|
||||
os.replace(source, dest + ".rotated")
|
||||
|
||||
rh = HandlerWithNamerAndRotator(
|
||||
self.fn, backupCount=2, maxBytes=1)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix test_logging.test_namer_rotator_inheritance() on Windows: use
|
||||
:func:`os.replace` rather than :func:`os.rename`. Patch by Victor Stinner.
|
Loading…
Reference in New Issue