# HG changeset patch # User Marcin Kuzminski # Date 2016-12-13 22:44:13 # Node ID 190eec84c45b41dfd76c2dc2c9a1b2f1dceebd24 # Parent 9274aa72a55ca636f7634bf6f557bf5f819e4865 ishell: updated code with latest ishell changes. diff --git a/rhodecode/lib/paster_commands/ishell.py b/rhodecode/lib/paster_commands/ishell.py --- 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):