pyln: Catch OSError when cleaning up test directories

This commit is contained in:
Christian Decker 2021-01-26 17:07:27 +01:00 committed by Rusty Russell
parent fc071c6784
commit a5f16ab5b1

View File

@ -90,7 +90,7 @@ def directory(request, test_base_dir, test_name):
if not failed:
try:
shutil.rmtree(directory)
except Exception:
except (OSError, Exception):
files = [os.path.join(dp, f) for dp, dn, fn in os.walk(directory) for f in fn]
print("Directory still contains files:", files)
raise