update to fix test cases

This commit is contained in:
adam j hartz 2016-03-20 19:43:32 -04:00
parent 56e9cb766d
commit 472c1f90cc
3 changed files with 3 additions and 3 deletions

View file

@ -111,7 +111,7 @@ class BaseShell(object):
super().__init__()
self.execer = execer
self.ctx = ctx
if kwargs['completer']:
if kwargs.get('completer', True):
self.completer = Completer()
self.buffer = []
self.need_more_lines = False

View file

@ -186,6 +186,7 @@ def premain(argv=None):
shell = builtins.__xonsh_shell__ = Shell(**shell_kwargs)
from xonsh import imphooks
env = builtins.__xonsh_env__
env['XONSH_LOGIN'] = shell_kwargs['login']
if args.defines is not None:
env.update([x.split('=', 1) for x in args.defines])
env['XONSH_INTERACTIVE'] = False

View file

@ -73,7 +73,7 @@ class Shell(object):
rc : list of str, optional
Sequence of paths to run control files.
"""
self.login = kwargs['login']
self.login = kwargs.get('login', True)
self.stype = shell_type
self._init_environ(ctx, config, rc)
env = builtins.__xonsh_env__
@ -125,6 +125,5 @@ class Shell(object):
self.ctx = xonshrc_context(rcfiles=rc, execer=self.execer)
else:
self.ctx = ctx
env['XONSH_LOGIN'] = self.login
builtins.__xonsh_ctx__ = self.ctx
self.ctx['__name__'] = '__main__'