Fix a small issue about shlex.split not working well with win32 path

This commit is contained in:
Meng Jue 2016-04-19 12:09:54 +08:00 committed by MengJueM
parent 6a3c943ce2
commit dd2425675b
2 changed files with 5 additions and 1 deletions

View File

@ -87,3 +87,4 @@ Russel Winder
Ben Webb
Alexei Kozlenok
Cal Leeming
Feng Ma

View File

@ -104,7 +104,10 @@ def _prepareconfig(args=None, plugins=None):
elif not isinstance(args, (tuple, list)):
if not isinstance(args, str):
raise ValueError("not a string or argument list: %r" % (args,))
args = shlex.split(args)
if sys.platform == "win32":
args = shlex.split(args, posix=False)
else:
args = shlex.split(args)
config = get_config()
pluginmanager = config.pluginmanager
try: