diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 17:59:22 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 17:59:22 +0100 |
commit | e1060a2a8c90c0730c3541811df8f906dac510a7 (patch) | |
tree | 1c29ef00a756be7e88aeb43cfa847dbf2e6f3079 /git/config.py | |
parent | 8a308613467a1510f8dac514624abae4e10c0779 (diff) | |
download | gitpython-e1060a2a8c90c0730c3541811df8f906dac510a7.tar.gz |
test_commit works once again
Diffstat (limited to 'git/config.py')
-rw-r--r-- | git/config.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git/config.py b/git/config.py index 988547a0..7917bc5a 100644 --- a/git/config.py +++ b/git/config.py @@ -201,6 +201,11 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje self.write() except IOError: log.error("Exception during destruction of GitConfigParser", exc_info=True) + except ReferenceError: + # This happens in PY3 ... and usually means that some state cannot be written + # as the sections dict cannot be iterated + # Usually when shutting down the interpreter, don'y know how to fix this + pass finally: self._lock._release_lock() @@ -345,7 +350,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje # END get lock for physical files if not hasattr(fp, "seek"): - fp = open(self._file_or_files, "w") + fp = open(self._file_or_files, "wb") close_fp = True else: fp.seek(0) |