mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-25 01:06:50 +00:00
make borg check work for empty repo
This commit is contained in:
parent
7501c3b530
commit
6a70d9968c
1 changed files with 6 additions and 1 deletions
|
@ -695,7 +695,12 @@ def init_chunks(self):
|
|||
self.chunks[id_] = (0, 0, 0)
|
||||
|
||||
def identify_key(self, repository):
|
||||
cdata = repository.get(next(self.chunks.iteritems())[0])
|
||||
try:
|
||||
some_chunkid, _ = next(self.chunks.iteritems())
|
||||
except StopIteration:
|
||||
# repo is completely empty, no chunks
|
||||
return None
|
||||
cdata = repository.get(some_chunkid)
|
||||
return key_factory(repository, cdata)
|
||||
|
||||
def rebuild_manifest(self):
|
||||
|
|
Loading…
Reference in a new issue