Issue #89: fix SVG encoding; remove progress bar.

This commit is contained in:
Sergey Vartanov 2021-09-25 07:49:30 +03:00
parent 394ca6a9d6
commit 067b815100
2 changed files with 4 additions and 1 deletions

View file

@ -280,5 +280,5 @@ def ui(arguments: argparse.Namespace) -> None:
painter.draw(constructor) painter.draw(constructor)
logging.info(f"Writing output SVG to {arguments.output_file_name}...") logging.info(f"Writing output SVG to {arguments.output_file_name}...")
with open(arguments.output_file_name, "w") as output_file: with open(arguments.output_file_name, "w", encoding="utf-8") as output_file:
svg.write(output_file) svg.write(output_file)

View file

@ -301,6 +301,9 @@ def progress_bar(
subsequently) subsequently)
:param text: short description :param text: short description
""" """
if number == 0:
sys.stdout.write(text + "...\n")
return
if number == -1: if number == -1:
sys.stdout.write(f"100 % {length * ''}{text}\n") sys.stdout.write(f"100 % {length * ''}{text}\n")
elif number % step == 0: elif number % step == 0: