summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-03-04 13:17:24 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-03-08 14:04:00 +0200
commit028a41cf9929057d606370e052264bba80669fe4 (patch)
tree2eac0c98a386802d2b125fbdb38cef0bfe8cd99c
parent3c2dce47958754b6f1855c3f35a8d49f1d5af932 (diff)
downloadgit-buildpackage-028a41cf9929057d606370e052264bba80669fe4.tar.gz
git-buildpackage-028a41cf9929057d606370e052264bba80669fe4.tar.bz2
git-buildpackage-028a41cf9929057d606370e052264bba80669fe4.zip
GitRepository: make _cmd_has_feature work in CentOS 6.3
Remove backspace characters when examining man page section names. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--gbp/git/repository.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 7c570f4b..83d3b3ad 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -221,6 +221,7 @@ class GitRepository(object):
# Parse git command man page
section_re = re.compile(r'^(?P<section>[A-Z].*)')
option_re = re.compile(r'--?(?P<name>[a-zA-Z\-]+).*')
+ backspace_re = re.compile(".\b")
man_section = None
for line in help.splitlines():
if man_section == "OPTIONS" and line.startswith(' -'):
@@ -232,7 +233,7 @@ class GitRepository(object):
# Check man section
match = section_re.match(line)
if match:
- man_section = match.group('section')
+ man_section = backspace_re.sub('', match.group('section'))
return False
@property