Changeset - e44954828c9a
[Not reviewed]
default
0 1 0
Mads Kiilerich - 7 years ago 2018-09-01 01:20:18
mads@kiilerich.com
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".
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/paster_commands/ishell.py
Show inline comments
 
@@ -43,10 +43,10 @@ class Command(BasePasterCommand):
 
    def take_action(self, args):
 
        try:
 
            from IPython import embed
 
        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.")
 
        except ImportError:
 
            print 'Kallithea ishell requires the IPython Python package'
 
            sys.exit(-1)
0 comments (0 inline, 0 general)