diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-10 02:11:51 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-10 02:11:51 +0000 |
commit | ddec8714cff06ebe933ec5ff8b9469a736d6c306 (patch) | |
tree | 0bc0baa3ebcbb34a887e0c639b22e445589418d6 /bin/emerge | |
parent | When the config_incrementals parameter is unspecified in the config (diff) | |
download | portage-multirepo-ddec8714cff06ebe933ec5ff8b9469a736d6c306.tar.gz portage-multirepo-ddec8714cff06ebe933ec5ff8b9469a736d6c306.tar.bz2 portage-multirepo-ddec8714cff06ebe933ec5ff8b9469a736d6c306.zip |
Bug #261852 - If an unexpected exception is raise from emerge_main() then
show the traceback after the mod_echo output to that the traceback isn't
obscured by mod_echo flooding.
svn path=/main/trunk/; revision=12814
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -44,4 +44,20 @@ if __name__ == "__main__": except ParseError, e: sys.stderr.write("%s\n" % str(e)) sys.exit(1) + except SystemExit: + raise + except Exception: + # If an unexpected exception occurs then we don't want the mod_echo + # output to obscure the traceback, so dump the mod_echo output before + # showing the traceback. + import traceback + tb_str = traceback.format_exc() + try: + from portage.elog import mod_echo + except ImportError: + pass + else: + mod_echo.finalize() + sys.stderr.write(tb_str) + sys.exit(1) sys.exit(retval) |