[PATCH] D79802: Fixed a problem removing temp files
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 11:25:17 PDT 2020
yln added a comment.
In D79802#2033902 <https://reviews.llvm.org/D79802#2033902>, @PeteSteinfeld wrote:
> 'module' object has no attribute 'rmtree'
So on Windows in Python2, `rmtree()` is not available? This surprises me (it's not mentioned in the docs). It also means the FIXME drew the wrong conclusion.
> When I moved the call to `shutil.rmtree()` out of the try/exception block, I got a stack dump the message at the bottom:
> NameError: global name 'shutil' is not defined
I think this means that the import statement is missing. Try to also move the `import shutil`.
> The simplest thing for me would be to remove the `FIXME` comment and add some text to the warning message recommending that the user upgrade their version of Python if they see the message.
>
> I put in such code and tested it under both Python 2.7.1 and 3.6.7, and it works for me.
Cool, 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