Fix exception thrown in .ycm_extra_conf.py

The call to subprocess.check_output returns a bytes instead of a str
object if not called with universal_newlines=True which raises an
exception further on due to mixing of bytes and str.
This commit is contained in:
Denis Kasak 2016-08-10 14:05:21 +02:00
parent ee16ae0e5f
commit 86062a0a09
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ database = None
def pkg_config(pkg):
def not_whitespace(string):
return not (string == '' or string == '\n')
output = subprocess.check_output(['pkg-config', '--cflags', pkg]).strip()
output = subprocess.check_output(['pkg-config', '--cflags', pkg], universal_newlines=True).strip()
return filter(not_whitespace, output.split(' '))
flags = [