Mercurial > kallithea
changeset 7368:e44954828c9a
ishell: only report 'Kallithea ishell requires the IPython Python package' when ipython import fails
Move everything but the actual ipython import outside the 'Kallithea ishell
requires the IPython Python package' "try".
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 01 Sep 2018 01:20:18 +0200 |
parents | c57d926edd39 |
children | cc2f0cfd7867 |
files | kallithea/lib/paster_commands/ishell.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/paster_commands/ishell.py Sat Sep 01 01:12:13 2018 +0200 +++ b/kallithea/lib/paster_commands/ishell.py Sat Sep 01 01:20:18 2018 +0200 @@ -43,10 +43,10 @@ def take_action(self, args): try: from IPython import embed - from traitlets.config.loader import Config - cfg = Config() - cfg.InteractiveShellEmbed.confirm_exit = False - embed(config=cfg, banner1="Kallithea IShell.") except ImportError: print 'Kallithea ishell requires the IPython Python package' sys.exit(-1) + from traitlets.config.loader import Config + cfg = Config() + cfg.InteractiveShellEmbed.confirm_exit = False + embed(config=cfg, banner1="Kallithea IShell.")