From 090b27a989291226115fff20d7e4a95465651cbf Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 29 May 2017 14:30:49 +0100 Subject: Python3 fixes --- ycm_extra_conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ycm_extra_conf.py') diff --git a/ycm_extra_conf.py b/ycm_extra_conf.py index a132da4..e4bde94 100644 --- a/ycm_extra_conf.py +++ b/ycm_extra_conf.py @@ -31,11 +31,12 @@ def ExpandBackTicks(line): def GetBJamCommandFlags(rtarget, target): flags = [] p = subprocess.Popen(['b2', '-and2', rtarget], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - for line in p.stdout.readlines(): - if string.lstrip(line).startswith('"g++"') and string.find(line, '"'+target+'"') > 0: + for lineBytes in p.stdout.readlines(): + line = lineBytes.decode("utf-8") + if str.lstrip(line).startswith('"g++"') and str.find(line, '"'+target+'"') > 0: flags = [] line = ExpandBackTicks(line) - args = string.split(line) + args = str.split(line) idx = 1 while args[idx] != '-c': flags.append(args[idx]) -- cgit v1.2.3