Skip to content

Commit

Permalink
Updating terminal messages for recheck subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpdev committed Jun 4, 2022
1 parent ed98b51 commit 6a8032c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torrentfile/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ def recheck(args: list) -> list:
logger.debug("Validating %s <---------------> %s contents", metafile, content)
msg = f"Rechecking {metafile} ..."
halfterm = shutil.get_terminal_size().columns / 2
padding = (halfterm - (len(msg) / 2)) * " "
padding = int(halfterm - (len(msg) / 2)) * " "
print(padding + msg)
checker = Checker(metafile, content)
logger.debug("Completed initialization of the Checker class")
result = checker.results()
message = f"{content} <- {result}% -> {metafile}"
padding = (halfterm - (len(message) / 2)) * " "
padding = int(halfterm - (len(message) / 2)) * " "
sys.stdout.write(padding + message + "\n")
sys.stdout.flush()
return result
Expand Down

0 comments on commit 6a8032c

Please sign in to comment.