[PATCH] D79802: Fixed a problem removing temp files

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 14:32:46 PDT 2020


yln added a comment.

Hi, thanks for tackling this!

I am not on Windows, so I can't reproduce this.  Would you be able to debug this so we understand what the problem is? For example, printing the exception object or looking into the error handler of `shutil.rmtree(... , onerror=..)` might shed light on things [1].

The docs say that `os.rmdir()` raises when the directory isn't empty, so maybe it's not the best tool here.

Does the following work?

  # Sleep and retry
  time.sleep(2) # what would be a good value here?
  shutil.rmtree(..., ignore_errors=True)

Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79802/new/

https://reviews.llvm.org/D79802





More information about the llvm-commits mailing list