From a97d21936200f1221d8ddd89202042faed1b9bcb Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 9 Dec 2009 21:38:12 +0100 Subject: config: fixed incorrect handling of default value in get_value remote.config: SectionConstraint now knows about set_value and get_value which are new to the GitConfigParser --- lib/git/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/git/config.py') diff --git a/lib/git/config.py b/lib/git/config.py index e8bdfc75..7a09a63c 100644 --- a/lib/git/config.py +++ b/lib/git/config.py @@ -360,7 +360,9 @@ class GitConfigParser(cp.RawConfigParser, LockFile): try: valuestr = self.get(section, option) except Exception: - return default + if default is not None: + return default + raise types = ( long, float ) for numtype in types: -- cgit v1.2.1