verify-checksum-models.py: use print() for printing table
This commit is contained in:
parent
aefd7492a3
commit
1b7c80072b
1 changed files with 3 additions and 4 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import hashlib
|
||||
|
||||
logger = logging.getLogger("verify-checksum-models")
|
||||
|
@ -77,9 +76,9 @@ for line in hash_list:
|
|||
|
||||
|
||||
# Print column headers for results table
|
||||
logger.info("filename".ljust(40) + "valid checksum".center(20) + "file missing".center(20))
|
||||
logger.info("-" * 80)
|
||||
print("filename".ljust(40) + "valid checksum".center(20) + "file missing".center(20)) # noqa: NP100
|
||||
print("-" * 80) # noqa: NP100
|
||||
|
||||
# Output the results as a table
|
||||
for r in results:
|
||||
sys.stdout.write(f"{r['filename']:40} {r['valid checksum']:^20} {r['file missing']:^20}\n")
|
||||
print(f"{r['filename']:40} {r['valid checksum']:^20} {r['file missing']:^20}") # noqa: NP100
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue