Pārlūkot izejas kodu

delete: fix --stats --iec output to use binary units, see #6606

Thomas Waldmann 3 gadi atpakaļ
vecāks
revīzija
0ddb1fa194
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/borg/archiver.py

+ 2 - 2
src/borg/archiver.py

@@ -1214,8 +1214,8 @@ class Archiver:
                 logger.warning('Aborted.')
                 logger.warning('Aborted.')
             return self.exit_code
             return self.exit_code
 
 
-        stats = Statistics()
-        with Cache(repository, key, manifest, progress=args.progress, lock_wait=self.lock_wait) as cache:
+        stats = Statistics(iec=args.iec)
+        with Cache(repository, key, manifest, progress=args.progress, lock_wait=self.lock_wait, iec=args.iec) as cache:
             msg_delete = 'Would delete archive: {} ({}/{})' if dry_run else 'Deleting archive: {} ({}/{})'
             msg_delete = 'Would delete archive: {} ({}/{})' if dry_run else 'Deleting archive: {} ({}/{})'
             msg_not_found = 'Archive {} not found ({}/{}).'
             msg_not_found = 'Archive {} not found ({}/{}).'
             logger_list = logging.getLogger('borg.output.list')
             logger_list = logging.getLogger('borg.output.list')