mirror of
https://github.com/arsenetar/send2trash.git
synced 2025-03-12 06:34:36 +00:00
Add exception handling to file cleanup
- Surpress errors caused by long file cleanup in older python environments
This commit is contained in:
parent
922fc0342a
commit
74f2dff57b
@ -144,7 +144,10 @@ def longdir(tmp_path):
|
||||
dirname = "\\\\?\\" + str(tmp_path)
|
||||
name = "A" * 100
|
||||
yield op.join(dirname, name, name, name)
|
||||
shutil.rmtree(dirname, ignore_errors=True)
|
||||
try:
|
||||
shutil.rmtree(dirname, ignore_errors=True)
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
Loading…
x
Reference in New Issue
Block a user