fixed conflict

This commit is contained in:
Anthony Scopatz 2016-06-20 13:36:07 -04:00
commit 4403a5cedd
3 changed files with 9 additions and 8 deletions

View file

@ -23,6 +23,7 @@ from xonsh.jobs import ignore_sigtstp
from xonsh.tools import setup_win_unicode_console, print_color
from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS
from xonsh.codecache import run_script_with_cache, run_code_with_cache
from xonsh.xonfig import xonfig_main
pygments = LazyObject(lambda: importlib.import_module('pygments'),
@ -239,10 +240,10 @@ def main(argv=None):
if (env['XONSH_INTERACTIVE'] and
not env['LOADED_CONFIG'] and
not any(os.path.isfile(i) for i in env['XONSHRC'])):
print('Could not find xonsh configuration or run control files.')
from xonsh import xonfig # lazy import
xonfig.xonfig_main(['wizard', '--confirm'])
shell.cmdloop()
print('Could not find xonsh configuration or run control files.',
file=sys.stderr)
xonfig_main(['wizard', '--confirm'])
shell.shell.cmdloop()
postmain(args)

View file

@ -91,7 +91,7 @@ class Shell(object):
# load xontribs from config file
names = builtins.__xonsh_config__.get('xontribs', ())
for name in names:
xontribs.update_context(name, ctx=self.ctx)
update_context(name, ctx=self.ctx)
# load run control files
env = builtins.__xonsh_env__
rc = env.get('XONSHRC') if rc is None else rc

View file

@ -93,7 +93,7 @@ import sys
import stat
import getopt
import builtins
import collections.abc as abc
#---- exceptions
@ -200,8 +200,8 @@ def whichgen(command, path=None, verbose=0, exts=None):
break
else:
exts = {'.com', '.exe', '.bat'}
elif not isinstance(exts, list):
raise TypeError("'exts' argument must be a list or None")
elif not isinstance(exts, abc.Set):
raise TypeError("'exts' argument must be a set or None")
else:
if exts is not None:
raise WhichError("'exts' argument is not supported on "\