From 03975016c53ba55c197d5806787c2b54371286f5 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 18 Oct 2015 16:43:59 +0200 Subject: [PATCH] upgrader: fix / reformat comments --- borg/upgrader.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/borg/upgrader.py b/borg/upgrader.py index ad35ab9d0..2a8a977d0 100644 --- a/borg/upgrader.py +++ b/borg/upgrader.py @@ -87,17 +87,15 @@ class AtticRepositoryUpgrader(Repository): segment.seek(0) segment.write(new_magic) else: - # remove the hardlink and rewrite the file. this - # works because our old file handle is still open - # so even though the file is removed, we can still - # read it until the file is closed. + # rename the hardlink and rewrite the file. this works + # because the file is still open. so even though the file + # is renamed, we can still read it until it is closed. os.rename(filename, filename + '.tmp') with open(filename, 'wb') as new_segment: new_segment.write(new_magic) new_segment.write(segment.read()) # the little dance with the .tmp file is necessary - # because Windows won't allow overwriting an open - # file. + # because Windows won't allow overwriting an open file. os.unlink(filename + '.tmp') def find_attic_keyfile(self):