1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-25 07:23:28 +00:00

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.
This commit is contained in:
Thomas Waldmann 2023-05-20 00:47:08 +02:00
parent 27f2dffdf8
commit 3d82be0b58
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -65,8 +65,7 @@ def tearDown(self):
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):