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/remote.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/git/remote.py') diff --git a/lib/git/remote.py b/lib/git/remote.py index e1d0d743..1e2e42fa 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -21,7 +21,7 @@ class _SectionConstraint(object): It supports all ConfigParser methods that operate on an option """ __slots__ = ("_config", "_section_name") - _valid_attrs_ = ("get", "set", "getint", "getfloat", "getboolean", "has_option") + _valid_attrs_ = ("get_value", "set_value", "get", "set", "getint", "getfloat", "getboolean", "has_option") def __init__(self, config, section): self._config = config @@ -32,10 +32,10 @@ class _SectionConstraint(object): return lambda *args: self._call_config(attr, *args) return super(_SectionConstraint,self).__getattribute__(attr) - def _call_config(self, method, *args): + def _call_config(self, method, *args, **kwargs): """Call the configuration at the given method which must take a section name as first argument""" - return getattr(self._config, method)(self._section_name, *args) + return getattr(self._config, method)(self._section_name, *args, **kwargs) class PushProgress(object): -- cgit v1.2.1