summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-12-01 00:18:47 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-12-01 00:18:47 +0100
commitf631214261a7769c8e6956a51f3d04ebc8ce8efd (patch)
treecce03dd4a6c7cbc17d34e3a50a76406c86e9adb7
parent468cad66ff1f80ddaeee4123c24e4d53a032c00d (diff)
downloadgitpython-f631214261a7769c8e6956a51f3d04ebc8ce8efd.tar.gz
Submodule tests are functional once again.
remote: Fixed bug that was caused by the unchecked deletion of an uncached attribute which did not necessarily exist
-rw-r--r--git/remote.py12
-rw-r--r--git/test/test_submodule.py2
2 files changed, 11 insertions, 3 deletions
diff --git a/git/remote.py b/git/remote.py
index c3e285d5..d3639f7b 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -413,7 +413,11 @@ class Remote(LazyMixin, Iterable):
self.repo.git.remote("rename", self.name, new_name)
self.name = new_name
- del(self._config_reader) # it contains cached values, section names are different now
+ try:
+ del(self._config_reader) # it contains cached values, section names are different now
+ except AttributeError:
+ pass
+ #END handle exception
return self
def update(self, **kwargs):
@@ -599,5 +603,9 @@ class Remote(LazyMixin, Iterable):
writer = self.repo.config_writer()
# clear our cache to assure we re-read the possibly changed configuration
- del(self._config_reader)
+ try:
+ del(self._config_reader)
+ except AttributeError:
+ pass
+ #END handle exception
return SectionConstraint(writer, self._config_section_name())
diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py
index 173d0f60..adb4fb82 100644
--- a/git/test/test_submodule.py
+++ b/git/test/test_submodule.py
@@ -20,7 +20,7 @@ prog = TestRootProgress()
class TestSubmodule(TestBase):
- k_subm_current = "e1e3017788213720afcfae0accddb2a6f2d9f052"
+ k_subm_current = "468cad66ff1f80ddaeee4123c24e4d53a032c00d"
k_subm_changed = "394ed7006ee5dc8bddfd132b64001d5dfc0ffdd3"
k_no_subm_tag = "0.1.6"