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:
parent
ee16ae0e5f
commit
86062a0a09
|
@ -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 = [
|
||||
|
|
Loading…
Reference in New Issue