From: "David Kågedal" <davidk@lysator•liu.se>
To: git@vger•kernel.org
Cc: Catalin Marinas <catalin.marinas@gmail•com>
Subject: [StGit PATCH] Don't print unnecessary backtraces when testing
Date: Fri, 17 Aug 2007 13:36:51 +0200 [thread overview]
Message-ID: <87sl6ipf3g.fsf@morpheus.local> (raw)
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.
---
I was running tests with -v and saw python backtraces, and assumed
that there was a bug somewhere. But apparently this backtrace only
appeared when running tests.
I think it's better if you only get backtraces when something actually
went wrong. The test driver sets the debug level to -1, so I changed
the check to check for positive instead.
stgit/main.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/stgit/main.py b/stgit/main.py
index 294b703..2390110 100644
--- a/stgit/main.py
+++ b/stgit/main.py
@@ -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)
--
1.5.3.rc3.119.g1812
--
David Kågedal
reply other threads:[~2007-08-17 11:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sl6ipf3g.fsf@morpheus.local \
--to=davidk@lysator$(echo .)liu.se \
--cc=catalin.marinas@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox