[PATCH] LIT: Support cancellation on Windows
Reid Kleckner
rnk at google.com
Fri Jul 19 04:54:25 PDT 2013
LGTM
Cool, I'm curious to see how this will work.
================
Comment at: utils/lit/lit/main.py:366
@@ +365,3 @@
+ win32api.SetConsoleCtrlHandler(console_ctrl_handler, True)
+ except ImportError:
+ pass
----------------
In Python, you can wrap the piece you expect to fail more precisely like so:
try:
import win32api
except ImportError:
pass
else:
def ...
This avoids catching ImportErrors from other code.
http://llvm-reviews.chandlerc.com/D1172
BRANCH
arc/lit-win-cancel
ARCANIST PROJECT
llvm
More information about the llvm-commits
mailing list