From 3c7b0bfbf62b1d919ca6251f8a246e9cfe64ae41 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Thu, 27 Dec 2012 20:40:54 +0000 Subject: Dump the tree whenever there is an exception --- (limited to 'tests/sugar/shell.py') diff --git a/tests/sugar/shell.py b/tests/sugar/shell.py index 515f98e..33917a9 100644 --- a/tests/sugar/shell.py +++ b/tests/sugar/shell.py @@ -1,6 +1,7 @@ import logging import sys import time +import traceback import tree @@ -83,4 +84,9 @@ def main(): for activity in build_activities_list(): launch_and_stop_activity(activity) -main() +try: + main() +except: + logging.error(traceback.format_exc()) + logging.error("\n%s" % tree.get_root().dump()) + raise -- cgit v0.9.1