Browse Source

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.
master
Denis Kasak 4 years ago
parent
commit
86062a0a09
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      .ycm_extra_conf.py

+ 1
- 1
.ycm_extra_conf.py 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 = [


Loading…
Cancel
Save