diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-12-01 00:18:47 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-12-01 00:18:47 +0100 |
commit | f631214261a7769c8e6956a51f3d04ebc8ce8efd (patch) | |
tree | cce03dd4a6c7cbc17d34e3a50a76406c86e9adb7 /git/remote.py | |
parent | 468cad66ff1f80ddaeee4123c24e4d53a032c00d (diff) | |
download | gitpython-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
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 12 |
1 files changed, 10 insertions, 2 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()) |