From b712405586c9c2ede799008dbd26ebf621428d0d Mon Sep 17 00:00:00 2001 From: Sabbir Muhit Date: Mon, 18 Jul 2016 22:38:10 -0400 Subject: [PATCH] Fix git config parsing Since the "git config" command adds a newline to the end of its output, the extraneous whitespace needs to be stripped out for proper parsing. Fixes #170 --- src/flake8/main/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flake8/main/git.py b/src/flake8/main/git.py index bae0233..8603f67 100644 --- a/src/flake8/main/git.py +++ b/src/flake8/main/git.py @@ -181,7 +181,7 @@ def piped_process(command): def git_config_for(parameter): config = piped_process(['git', 'config', '--get', '--bool', parameter]) (stdout, _) = config.communicate() - return to_text(stdout) + return to_text(stdout).strip() def config_for(parameter):