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:
parent
d74365969e
commit
2c9fc3d63e
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user