From 23643a710abc5186fd03f7d9f8648890785caca7 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Tue, 13 Dec 2016 23:44:13 +0100 Subject: [PATCH] ishell: updated code with latest ishell changes. --- rhodecode/lib/paster_commands/ishell.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/rhodecode/lib/paster_commands/ishell.py b/rhodecode/lib/paster_commands/ishell.py index 7cdb51d5..28fb6b76 100644 --- a/rhodecode/lib/paster_commands/ishell.py +++ b/rhodecode/lib/paster_commands/ishell.py @@ -35,6 +35,13 @@ sys.path.append(rc_path) log = logging.getLogger(__name__) +welcome_banner = """Welcome to RhodeCode iShell. +Type `exit` to exit the shell. +iShell is interactive shell to interact directly with the +internal RhodeCode APIs. You can rescue your lost password, +or reset some user/system settings. +""" + class Command(BasePasterCommand): @@ -61,12 +68,12 @@ class Command(BasePasterCommand): try: from IPython import embed - from IPython.config.loader import Config + from traitlets.config import Config cfg = Config() cfg.InteractiveShellEmbed.confirm_exit = False - embed(config=cfg, banner1="RhodeCode IShell.") + embed(config=cfg, banner1=welcome_banner) except ImportError: - print 'ipython installation required for ishell' + print('ipython installation required for ishell') sys.exit(-1) def update_parser(self):