Drop deprecated onerror

The onerror argument of the shutil.rmtree function was deprecated in
Python 3.12 . Because the current value matches the actual default of
the function, drop the usage.

[1] https://docs.python.org/3/library/shutil.html#shutil.rmtree

```
Changed in version 3.12: Added the onexc parameter, deprecated onerror.
```

Change-Id: I78e32a520a8c7787ad3c8b79b605917648f7e6d8
This commit is contained in:
Takashi Kajinami 2024-10-13 01:18:49 +09:00
parent d74365969e
commit 2c9fc3d63e
3 changed files with 3 additions and 3 deletions

View File

@ -277,7 +277,7 @@ def create_fake_sysfs(prefix=""):
sys_class_fpga = os.path.join(prefix, SYS_CLASS_FPGA)
basedir = os.path.dirname(sys_device)
if os.path.exists(basedir):
shutil.rmtree(basedir, ignore_errors=False, onerror=None)
shutil.rmtree(basedir, ignore_errors=False)
os.makedirs(sys_class_fpga)
create_devices_path_and_files(FPGA_TREE, sys_device, sys_class_fpga)
create_devices_soft_link(sys_class_fpga)

View File

@ -241,5 +241,5 @@ def create_fake_sysfs(prefix=""):
sys_device = os.path.join(prefix, SYS_DEVICES)
basedir = os.path.dirname(sys_device)
if os.path.exists(basedir):
shutil.rmtree(basedir, ignore_errors=False, onerror=None)
shutil.rmtree(basedir, ignore_errors=False)
create_devices_path_and_files(NIC_TREE, sys_device)

View File

@ -242,7 +242,7 @@ def create_fake_sysfs(prefix=""):
sys_device = os.path.join(prefix, SYS_DEVICES)
basedir = os.path.dirname(sys_device)
if os.path.exists(basedir):
shutil.rmtree(basedir, ignore_errors=False, onerror=None)
shutil.rmtree(basedir, ignore_errors=False)
create_devices_path_and_files(QAT_TREE, sys_device)