diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 77ef445..e9f1649 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -147,7 +147,8 @@ class TerminalInteractiveShell(InteractiveShell): @observe('editing_mode') def _editing_mode(self, change): u_mode = change.new.upper() - self.pt_app.editing_mode = u_mode + if self.pt_app: + self.pt_app.editing_mode = u_mode @observe('highlighting_style') @observe('colors')