summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ycm_extra_conf.py7
1 files changed, 4 insertions, 3 deletions
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])