summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-04 11:35:13 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-04 11:39:05 +0200
commit833ac6ec4c9f185fd40af7852b6878326f44a0b3 (patch)
tree6530704ac746bc54a7748b4937a5dd07f4f6643c
parent8a2f7dce43617b773a6be425ea155812396d3856 (diff)
downloadgitpython-833ac6ec4c9f185fd40af7852b6878326f44a0b3.tar.gz
config: FIX regression by prev commit "wrap all conf..."
+ Bug appeared as last 5 TCs (test_commit & test_stream) said: OSError: [WinError 6] The handle is invalid
-rw-r--r--git/objects/submodule/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index 6777b121..28802b35 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -993,8 +993,8 @@ class Submodule(IndexObject, Iterable, Traversable):
pw.rename_section(sm_section(self.name), sm_section(new_name))
# .gitmodules
- with self.config_writer(write=True) as cw:
- cw.config.rename_section(sm_section(self.name), sm_section(new_name))
+ with self.config_writer(write=True).config as cw:
+ cw.rename_section(sm_section(self.name), sm_section(new_name))
self._name = new_name