Merge pull request #47389 from dwoz/moregittestfix

Older GitPython versions will not have close
This commit is contained in:
Daniel Wallace 2018-04-29 11:42:05 -05:00 committed by GitHub
commit a86e53be66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,7 +220,8 @@ class GitFSTest(TestCase, LoaderModuleMockMixin):
repo.index.add([x for x in os.listdir(self.tmp_repo_dir)
if x != '.git'])
repo.index.commit('Test')
repo.close()
if hasattr(repo, 'close'):
repo.close()
gitfs.update()
def tearDown(self):