# HG changeset patch # User Mads Kiilerich # Date 1535757618 -7200 # Node ID e44954828c9a50c6f9cae8bf1fd3a8a122ccf708 # Parent c57d926edd39aa6a36b83cfc26c488e786031e31 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". diff -r c57d926edd39 -r e44954828c9a kallithea/lib/paster_commands/ishell.py --- 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.")