[PATCH] D68589: [lit] Leverage argparse features to remove some code
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 09:47:10 PDT 2019
yln marked 4 inline comments as done.
yln added inline comments.
================
Comment at: llvm/utils/lit/lit/cl_arguments.py:204
+ n = int(arg)
+ except:
+ raise _arg_error('positive integer', arg)
----------------
serge-sans-paille wrote:
> It's generally better to catch the conversion error explicitly (here ``ValueError``)
Done. Thanks!
================
Comment at: llvm/utils/lit/lit/cl_arguments.py:211
+def _arg_error(desc, arg):
+ msg = "require %s, but found '%s'" % (desc, arg)
+ return argparse.ArgumentTypeError(msg)
----------------
serge-sans-paille wrote:
> require*s*
Updated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68589/new/
https://reviews.llvm.org/D68589
More information about the llvm-commits
mailing list