Mercurial > treepkg
changeset 310:26c15a0f0e52
When stopping because of an error, do not raise the exception again as
it leads to confusing double tracebacks in the log. Instead, simply log
the reason for the stopping and stop in the same way a stop instruction
is handled.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 02 Dec 2009 14:46:37 +0000 |
parents | 3749b8285b93 |
children | d0acc0614de5 |
files | treepkg/packager.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/treepkg/packager.py Tue Dec 01 18:54:34 2009 +0000 +++ b/treepkg/packager.py Wed Dec 02 14:46:37 2009 +0000 @@ -659,7 +659,8 @@ logging.exception("An error occurred while" " checking packager track %r", track.name) if self.stop_on_error: - raise + logging.info("Stopping because of errors.") + return True if self.should_stop(): logging.info("Received stop instruction. Stopping.") return True