Browse Source

pyln: Catch OSError when cleaning up test directories

master
Christian Decker 4 years ago
committed by Rusty Russell
parent
commit
a5f16ab5b1
  1. 2
      contrib/pyln-testing/pyln/testing/fixtures.py

2
contrib/pyln-testing/pyln/testing/fixtures.py

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

Loading…
Cancel
Save