mirror of
1
0
Fork 0

Resolve a Python 3.12 `DeprecationWarning`

This commit is contained in:
Kurt McKee 2023-09-10 10:27:54 -05:00
parent 840cd164d2
commit eba0b24331
No known key found for this signature in database
GPG Key ID: 64713C0B5BA8E1C2
1 changed files with 4 additions and 1 deletions

View File

@ -219,7 +219,10 @@ def root(standardize_tmp):
finally:
[patch.stop() for patch in patches]
os.chdir(current_working_directory)
rmtree(current_root, onerror=rmtree_error_handler)
if sys.version_info >= (3, 12):
rmtree(current_root, onexc=rmtree_error_handler)
else:
rmtree(current_root, onerror=rmtree_error_handler)
@pytest.fixture