Skip to content

Commit

Permalink
pyln: Catch OSError when cleaning up test directories
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker authored and rustyrussell committed Jan 28, 2021
1 parent fc071c6 commit a5f16ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/pyln-testing/pyln/testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5f16ab

Please sign in to comment.