From 1496979cf7e9692ef869d2f99da6141756e08d25 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 22 Oct 2009 19:43:01 +0200 Subject: default index writing now writes the index of the current repository in a fashion comparable to the native implementation --- lib/git/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/git/utils.py') diff --git a/lib/git/utils.py b/lib/git/utils.py index f188a7a4..8cdb4804 100644 --- a/lib/git/utils.py +++ b/lib/git/utils.py @@ -201,7 +201,9 @@ class ConcurrentWriteOperation(LockFile): if self._temp_write_fp is None: return - self._temp_write_fp.close() + if not self._temp_write_fp.closed: + self._temp_write_fp.close() + if successful: # on windows, rename does not silently overwrite the existing one if sys.platform == "win32": -- cgit v1.2.1