diff options
author | Thomas Waldmann <tw@waldmann-edv.de> | 2023-05-20 00:47:08 +0200 |
---|---|---|
committer | Thomas Waldmann <tw@waldmann-edv.de> | 2023-06-27 22:33:57 +0200 |
commit | 83b2b5cb6cbc7cd65d9c4e31986a76297d862a17 (patch) | |
tree | 7bd14309d62c6dbc2c61431e618d9a1e4b9323eb /src | |
parent | 0947e9fb22ffa4e53c71ed52827894fa07836419 (diff) |
fix RepositoryTestCaseBase.reopen method
"if self.repository" did not work as expected:
- Repository has a __len__ method, so the boolean evaluation was calling that.
- self.repository is also not set to None anywhere.
Diffstat (limited to 'src')
-rw-r--r-- | src/borg/testsuite/repository.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/borg/testsuite/repository.py b/src/borg/testsuite/repository.py index c51574920..383014021 100644 --- a/src/borg/testsuite/repository.py +++ b/src/borg/testsuite/repository.py @@ -41,8 +41,7 @@ class RepositoryTestCaseBase(BaseTestCase): shutil.rmtree(self.tmppath) def reopen(self, exclusive=UNSPECIFIED): - if self.repository: - self.repository.close() + self.repository.close() self.repository = self.open(exclusive=exclusive) def add_keys(self): |