浏览代码

fixup: output stats in dry-run mode

it will just show nothing was deleted, but one sees how it would look
like.

this is also for consistency with borg prune --dry-run --stats, which
behaves the same.

(cherry picked from commit 857c5635dd0eb7d4ffa5ba183b660626d4bd2afe)
Thomas Waldmann 7 年之前
父节点
当前提交
0377fb38fd
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/borg/archiver.py

+ 6 - 6
src/borg/archiver.py

@@ -1080,12 +1080,12 @@ class Archiver:
                 manifest.write()
                 repository.commit(save_space=args.save_space)
                 cache.commit()
-                if args.stats:
-                    log_multi(DASHES,
-                              STATS_HEADER,
-                              stats.summary.format(label='Deleted data:', stats=stats),
-                              str(cache),
-                              DASHES, logger=logging.getLogger('borg.output.stats'))
+            if args.stats:
+                log_multi(DASHES,
+                          STATS_HEADER,
+                          stats.summary.format(label='Deleted data:', stats=stats),
+                          str(cache),
+                          DASHES, logger=logging.getLogger('borg.output.stats'))
 
         return self.exit_code