summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-02 22:39:27 +0200
committerGitHub <noreply@github.com>2016-10-02 22:39:27 +0200
commitfd8537b23ce85be6f9dacb7806e791b7f902a206 (patch)
treeec46b9f3844cc71c9e47546bf991640e0226c33d /git/config.py
parentdf5c1cb715664fd7a98160844572cc473cb6b87c (diff)
parent51f4a1407ef12405e16f643f5f9d2002b4b52ab9 (diff)
downloadgitpython-fd8537b23ce85be6f9dacb7806e791b7f902a206.tar.gz
Merge pull request #523 from yarikoptic/enh-wraps
RF: use @functools.wraps within decorators instead of manual __name__ reassignment
Diffstat (limited to 'git/config.py')
-rw-r--r--git/config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/git/config.py b/git/config.py
index ad6192ff..b342410c 100644
--- a/git/config.py
+++ b/git/config.py
@@ -17,6 +17,8 @@ import logging
import abc
import os
+from functools import wraps
+
from git.odict import OrderedDict
from git.util import LockFile
from git.compat import (
@@ -67,11 +69,11 @@ class MetaParserBuilder(abc.ABCMeta):
def needs_values(func):
"""Returns method assuring we read values (on demand) before we try to access them"""
+ @wraps(func)
def assure_data_present(self, *args, **kwargs):
self.read()
return func(self, *args, **kwargs)
# END wrapper method
- assure_data_present.__name__ = func.__name__
return assure_data_present