Skip to content

Commit

Permalink
Fixed import of IPython UnknownBackend for IPython 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Apr 19, 2017
1 parent d266985 commit 0761163
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ v0.10.3 (unreleased)

* Fixed bugs with saving and restoring of various types of subset states. [#1285]

* Fixed a bug that caused glue to not open when IPython 4.0 was installed.

v0.10.2 (2017-03-22)
--------------------

Expand Down
9 changes: 8 additions & 1 deletion glue/app/qt/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ def _fix_ipython_pylab():
return

from IPython.core.error import UsageError
from IPython.terminal.pt_inputhooks import UnknownBackend

# UnknownBackend exists only in IPython 5.0 and above, so if it doesn't
# exist we just set UnknownBackend to be a fake exception class
try:
from IPython.terminal.pt_inputhooks import UnknownBackend
except ImportError:
class UnknownBackend(Exception):
pass

try:
shell.enable_pylab('inline', import_all=True)
Expand Down

0 comments on commit 0761163

Please sign in to comment.