From 86062a0a095ec190187b9ecd3835492bbec97122 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Wed, 10 Aug 2016 14:05:21 +0200 Subject: [PATCH] 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. --- .ycm_extra_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py index 2970de2..aa2bf99 100644 --- a/.ycm_extra_conf.py +++ b/.ycm_extra_conf.py @@ -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 = [