From d7c7b667e1574855db2df1b73e61a3b4944156d8 2011-12-03 08:58:03 From: Matthias BUSSONNIER Date: 2011-12-03 08:58:03 Subject: [PATCH] qtconsole --pure, avoid 'user_expression' 'user_expression' does not exist with --pure, be more carefull.. --- diff --git a/IPython/frontend/qt/console/frontend_widget.py b/IPython/frontend/qt/console/frontend_widget.py index 5d510dd..8fbd8f7 100644 --- a/IPython/frontend/qt/console/frontend_widget.py +++ b/IPython/frontend/qt/console/frontend_widget.py @@ -370,7 +370,9 @@ class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin): """ - user_exp = msg['content']['user_expressions'] + user_exp = msg['content'].get('user_expressions') + if not user_exp: + return for expression in user_exp: if expression in self._callback_dict: self._callback_dict.pop(expression)(user_exp[expression])