{"thread":{"id":"9561","subject":"[StGit PATCH] Don't print unnecessary backtraces when testing","startedAt":"2007-08-17T11:36:51Z","lastAt":"2007-08-17T11:36:51Z","messageCount":1,"participants":["David Kågedal"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"50931","messageId":"87sl6ipf3g.fsf@morpheus.local","threadId":"9561","inReplyTo":null,"subject":"[StGit PATCH] Don't print unnecessary backtraces when testing","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2007-08-17T11:36:51Z","receivedAt":"2007-08-17T11:36:51Z","isPatch":true,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"When stg fails, and handles it properly, no backtrace should be printed,\neven when running tests with -v.  Getting a backtrace in the output signals\nsome kind of bug, but in this case there is no bug.\n---\n\nI was running tests with -v and saw python backtraces, and assumed\nthat there was a bug somewhere.  But apparently this backtrace only\nappeared when running tests.\n\nI think it's better if you only get backtraces when something actually\nwent wrong.  The test driver sets the debug level to -1, so I changed\nthe check to check for positive instead.\n\n stgit/main.py |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/stgit/main.py b/stgit/main.py\nindex 294b703..2390110 100644\n--- a/stgit/main.py\n+++ b/stgit/main.py\n@@ -286,7 +286,7 @@ def main():\n             StackException, GitException, GitMergeException,\n             EditorException), err:\n         print >> sys.stderr, '%s %s: %s' % (prog, cmd, err)\n-        if debug_level:\n+        if debug_level > 0:\n             raise\n         else:\n             sys.exit(2)\n-- \n1.5.3.rc3.119.g1812\n\n\n-- \nDavid Kågedal\n"}]}