Fix potentially broken shutil.rmtree in tests (#26665)
Seems like https://bugs.python.org/issue29699 is relevant. Better to just ignore errors when removing them tmpdir. The OS will remove it anyways. Errors are happening randomly from tests that are using this fixture.
This commit is contained in:
parent
66b32b337f
commit
c2bf585d17
@ -971,7 +971,10 @@ def mock_gnupghome(monkeypatch):
|
||||
yield short_name_tmpdir
|
||||
|
||||
# clean up, since we are doing this manually
|
||||
shutil.rmtree(short_name_tmpdir)
|
||||
# Ignore errors cause we seem to be hitting a bug similar to
|
||||
# https://bugs.python.org/issue29699 in CI (FileNotFoundError: [Errno 2] No such
|
||||
# file or directory: 'S.gpg-agent.extra').
|
||||
shutil.rmtree(short_name_tmpdir, ignore_errors=True)
|
||||
|
||||
##########
|
||||
# Fake archives and repositories
|
||||
|
Loading…
Reference in New Issue
Block a user