From: Julian Taylor <jtaylor.deb...@googlemail.com> IPython 0.11 has changed API: AutoFormattedTB is now in IPython.core.ultratb, not in IPython.ultraTB. We automatically fall back to the pre-0.11 names if the 0.11 import statement fails.
[added comments, changed description] Signed-off-by: Sascha Silbe <si...@activitycentral.com> Reviewed-by: Sascha Silbe <si...@activitycentral.com> --- src/sugar/logger.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/sugar/logger.py b/src/sugar/logger.py index 275c57d..21cd2c9 100644 --- a/src/sugar/logger.py +++ b/src/sugar/logger.py @@ -69,7 +69,13 @@ def _except_hook(exctype, value, traceback): # Attempt to provide verbose IPython tracebacks. # Importing IPython is slow, so we import it lazily. try: - from IPython.ultraTB import AutoFormattedTB + try: + # IPython 0.11+ + from IPython.core.ultratb import AutoFormattedTB + except ImportError: + # IPython 0.10.2 and below + from IPython.ultraTB import AutoFormattedTB + sys.excepthook = AutoFormattedTB(mode='Verbose', color_scheme='NoColor') except ImportError: -- 1.7.5.4 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org