Skip to content

Commit

Permalink
fix blob validation show order list display in file logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Jul 21, 2024
1 parent bc38a4c commit f6df9ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prime_backup/mcdr/task/db/validate_db_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def __validate_blobs(self, vlogger: log_utils.FileLogger):

def show(what: str, lst: List[BadBlobItem]):
if len(lst) > 0:
vlogger.info('bad blob with category {} (len={})'.format(what, len(lst)))
vlogger.info('bad blob with category "{}" (len={})'.format(what, len(lst)))
self.reply_tr(f'validate_blobs.{what}', TextComponents.number(len(lst)))
item: BadBlobItem
for i, item in enumerate(lst):
text = RTextBase.format('{}. {}: {}', i + 1, item.blob.hash, item.desc)
vlogger.info('%s. %s', i + 1, text.to_plain_text())
vlogger.info(text.to_plain_text())
self.reply(text)

self.reply(self.tr('validate_blobs.found_bad_blobs', TextComponents.number(result.validated - result.ok), TextComponents.number(result.validated)).set_color(RColor.red))
Expand Down

0 comments on commit f6df9ff

Please sign in to comment.