comparison treepkg/packager.py @ 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 61d1daac23d4
children 2d6915bce473
comparison
equal deleted inserted replaced
309:3749b8285b93 310:26c15a0f0e52
657 repeat = self.install_dependencies(track, packager) 657 repeat = self.install_dependencies(track, packager)
658 except: 658 except:
659 logging.exception("An error occurred while" 659 logging.exception("An error occurred while"
660 " checking packager track %r", track.name) 660 " checking packager track %r", track.name)
661 if self.stop_on_error: 661 if self.stop_on_error:
662 raise 662 logging.info("Stopping because of errors.")
663 return True
663 if self.should_stop(): 664 if self.should_stop():
664 logging.info("Received stop instruction. Stopping.") 665 logging.info("Received stop instruction. Stopping.")
665 return True 666 return True
666 if repeat: 667 if repeat:
667 logging.info("Built binaries needed by other tracks." 668 logging.info("Built binaries needed by other tracks."
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)