Răsfoiți Sursa

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.
Thomas Waldmann 7 ani în urmă
părinte
comite
857c5635dd
1 a modificat fișierele cu 6 adăugiri și 6 ștergeri
  1. 6 6
      src/borg/archiver.py

+ 6 - 6
src/borg/archiver.py

@@ -1279,12 +1279,12 @@ class Archiver:
                 manifest.write()
                 manifest.write()
                 repository.commit(save_space=args.save_space)
                 repository.commit(save_space=args.save_space)
                 cache.commit()
                 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
         return self.exit_code