Skip to content

Commit

Permalink
add debug for cleanup_tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Oct 29, 2024
1 parent da2b49f commit 8b9ea0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cffi/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,11 @@ def cleanup_tmpdir(tmpdir=None, keep_so=False):
fn.lower().endswith(suffix) or fn.lower().endswith('.c')):
try:
os.unlink(os.path.join(tmpdir, fn))
except OSError:
except OSError as e:
print("could not remove", fn, e)
pass
else:
print("removed", fn)
clean_dir = [os.path.join(tmpdir, 'build')]
for dir in clean_dir:
try:
Expand All @@ -298,6 +301,7 @@ def cleanup_tmpdir(tmpdir=None, keep_so=False):
clean_dir.append(fn)
else:
os.unlink(fn)
print("removed", fn)
except OSError:
pass

Expand Down

0 comments on commit 8b9ea0b

Please sign in to comment.