Rev 6241: (gz) Write traceback as one block from selftest forked children (Martin in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Nov 7 12:03:35 UTC 2011
At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 6241 [merge]
revision-id: pqm at pqm.ubuntu.com-20111107120335-yhorvhorelcrvs0m
parent: pqm at pqm.ubuntu.com-20111104185227-fe7stgvmq3ehl6k3
parent: martin.packman at canonical.com-20111107101438-gr3oj8dabgr70on6
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-11-07 12:03:35 +0000
message:
(gz) Write traceback as one block from selftest forked children (Martin
Packman)
modified:
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2011-10-21 15:58:51 +0000
+++ b/bzrlib/tests/__init__.py 2011-11-07 10:14:38 +0000
@@ -3516,9 +3516,11 @@
process_suite.run(subunit_result)
except:
# Try and report traceback on stream, but exit with error even
- # if stream couldn't be created or something else goes wrong
+ # if stream couldn't be created or something else goes wrong.
+ # The traceback is formatted to a string and written in one go
+ # to avoid interleaving lines from multiple failing children.
try:
- traceback.print_exc(file=stream)
+ stream.write(traceback.format_exc())
finally:
os._exit(1)
os._exit(0)
More information about the bazaar-commits
mailing list