mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-25 08:33:22 +03:00
str.split() does not accept maxsplit as a keyword argument in Python2
This commit is contained in:
parent
ff613348eb
commit
b5e59d3e3a
@ -49,7 +49,7 @@ def split_cmdline(cmdline):
|
|||||||
# XXX: workaround for psutil issue #742
|
# XXX: workaround for psutil issue #742
|
||||||
if LINUX and any(x in cmdline[0] for x in ('chrome', 'chromium')):
|
if LINUX and any(x in cmdline[0] for x in ('chrome', 'chromium')):
|
||||||
try:
|
try:
|
||||||
exe, arguments = cmdline[0].split(' ', maxsplit=1)
|
exe, arguments = cmdline[0].split(' ', 1)
|
||||||
path, cmd = os.path.split(exe)
|
path, cmd = os.path.split(exe)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
arguments = None
|
arguments = None
|
||||||
|
Loading…
Reference in New Issue
Block a user