changeset 27510:020d93c4a727

check-seclevel: add a --debug option This will make it possible to get semi-meaningful tracebacks if an import error occurs. Why care? Trying to run this script under pypy currently fails, but the true error is obscured.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 22 Dec 2015 21:38:05 -0800
parents 6ff90d618d72
children 44a596a8bed1
files doc/check-seclevel.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/check-seclevel.py	Mon Nov 23 12:14:01 2015 -0500
+++ b/doc/check-seclevel.py	Tue Dec 22 21:38:05 2015 -0800
@@ -127,6 +127,9 @@
     optparser.add_option("-v", "--verbose",
                          help="enable additional output",
                          action="store_true")
+    optparser.add_option("-d", "--debug",
+                         help="debug mode",
+                         action="store_true")
     optparser.add_option("-f", "--file",
                          help="filename to read in (or '-' for stdin)",
                          action="store", default="")
@@ -152,6 +155,7 @@
 
     ui = uimod.ui()
     ui.setconfig('ui', 'verbose', options.verbose, '--verbose')
+    ui.setconfig('ui', 'debug', options.debug, '--debug')
 
     if options.file:
         if checkfile(ui, options.file, options.initlevel):