summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSabbir Muhit <smuhit@gmail.com>2016-07-18 22:38:10 -0400
committerSabbir Muhit <smuhit@gmail.com>2016-07-18 22:44:45 -0400
commitb712405586c9c2ede799008dbd26ebf621428d0d (patch)
tree303105e92d6981337f149f9dff735d4b1f27b105 /src
parente778c6ebc3f2d85f8a10ae4e952dbfd55b049366 (diff)
downloadflake8-b712405586c9c2ede799008dbd26ebf621428d0d.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/flake8/main/git.py2
1 files changed, 1 insertions, 1 deletions
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):