ishell: updated code with latest ishell changes.
This commit is contained in:
parent
af04fb1d46
commit
23643a710a
1 changed files with 10 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue