Don't print unnecessary backtraces when testing
authorDavid Kågedal <davidk@lysator.liu.se>
Fri, 17 Aug 2007 11:36:51 +0000 (13:36 +0200)
committerKarl Hasselström <kha@treskal.com>
Tue, 21 Aug 2007 20:58:00 +0000 (22:58 +0200)
When stg fails, and handles it properly, no backtrace should be printed,
even when running tests with -v.  Getting a backtrace in the output signals
some kind of bug, but in this case there is no bug.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/main.py

index 294b703..2390110 100644 (file)
@@ -286,7 +286,7 @@ def main():
             StackException, GitException, GitMergeException,
             EditorException), err:
         print >> sys.stderr, '%s %s: %s' % (prog, cmd, err)
-        if debug_level:
+        if debug_level > 0:
             raise
         else:
             sys.exit(2)