diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 15:39:28 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 15:39:28 +0100 |
commit | 6f55c17f48d7608072199496fbcefa33f2e97bf0 (patch) | |
tree | d6c69f667f3cce87d3fe5bf9baa62a081f4af7a8 /git/config.py | |
parent | 1b9d3b961bdf79964b883d3179f085d8835e528d (diff) | |
download | gitpython-6f55c17f48d7608072199496fbcefa33f2e97bf0.tar.gz |
Replaced ordered dict with standard version; used logging module
All performance tests still print to stderr, but do so in a py3 compatible way
Diffstat (limited to 'git/config.py')
-rw-r--r-- | git/config.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git/config.py b/git/config.py index 51337db4..6a85760c 100644 --- a/git/config.py +++ b/git/config.py @@ -9,6 +9,7 @@ configuration files""" import re import ConfigParser as cp import inspect +import logging from git.odict import OrderedDict from git.util import LockFile @@ -16,6 +17,9 @@ from git.util import LockFile __all__ = ('GitConfigParser', 'SectionConstraint') +log = logging.getLogger('git.config') + + class MetaParserBuilder(type): """Utlity class wrapping base-class methods into decorators that assure read-only properties""" @@ -186,8 +190,8 @@ class GitConfigParser(cp.RawConfigParser, object): try: try: self.write() - except IOError as e: - print("Exception during destruction of GitConfigParser: %s" % str(e)) + except IOError: + log.error("Exception during destruction of GitConfigParser", exc_info=True) finally: self._lock._release_lock() |