str.split() does not accept maxsplit as a keyword argument in Python2

This commit is contained in:
Alessio Sergi 2016-04-04 20:34:02 +02:00
parent ff613348eb
commit b5e59d3e3a

View File

@ -49,7 +49,7 @@ def split_cmdline(cmdline):
# XXX: workaround for psutil issue #742
if LINUX and any(x in cmdline[0] for x in ('chrome', 'chromium')):
try:
exe, arguments = cmdline[0].split(' ', maxsplit=1)
exe, arguments = cmdline[0].split(' ', 1)
path, cmd = os.path.split(exe)
except ValueError:
arguments = None