1
0
Fork 0
mirror of synced 2024-07-26 18:11:13 -04:00

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

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