1
0
Fork 0
mirror of synced 2024-11-03 00:48:57 -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,6 +219,9 @@ def root(standardize_tmp):
finally: finally:
[patch.stop() for patch in patches] [patch.stop() for patch in patches]
os.chdir(current_working_directory) os.chdir(current_working_directory)
if sys.version_info >= (3, 12):
rmtree(current_root, onexc=rmtree_error_handler)
else:
rmtree(current_root, onerror=rmtree_error_handler) rmtree(current_root, onerror=rmtree_error_handler)