borg upgrade - fix README contents

This commit is contained in:
Thomas Waldmann 2015-12-10 10:51:56 +01:00
parent 8671be1ef2
commit e9ab11be49
1 changed files with 7 additions and 0 deletions

View File

@ -50,11 +50,18 @@ class AtticRepositoryUpgrader(Repository):
try:
self.convert_cache(dryrun)
self.convert_segments(segments, dryrun=dryrun, inplace=inplace)
self.borg_readme()
finally:
self.lock.release()
self.lock = None
return backup
def borg_readme(self):
readme = os.path.join(self.path, 'README')
os.remove(readme)
with open(readme, 'w') as fd:
fd.write('This is a Borg repository\n')
@staticmethod
def convert_segments(segments, dryrun=True, inplace=False):
"""convert repository segments from attic to borg