pw_bloat: Fix double printing ASCII table
Printed size report every time a new diff report was calculated,
causing the pw watch to print out lots of duplicate tables before
finishing the entire size report.
Change-Id: I2c5fa8a6d875ba6e729a14c30e67d2776a566239
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/109013
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Brandon Vu <brandonvu@google.com>
diff --git a/pw_bloat/py/pw_bloat/bloat.py b/pw_bloat/py/pw_bloat/bloat.py
index fcbfaa7..e2e74c8 100755
--- a/pw_bloat/py/pw_bloat/bloat.py
+++ b/pw_bloat/py/pw_bloat/bloat.py
@@ -234,14 +234,13 @@
MAX_COL_WIDTH,
LineCharset,
diff_label=curr_diff_binary['label']).create_table()
-
- print(diff_report)
curr_rst_report = RstOutput(diff_dsm, curr_diff_binary['label'])
if rst_diff_report == '':
rst_diff_report = curr_rst_report.create_table()
else:
rst_diff_report += f"{curr_rst_report.add_report_row()}\n"
+ print(diff_report)
write_file(gn_arg_dict['target_name'], rst_diff_report,
gn_arg_dict['out_dir'])
write_file(f"{gn_arg_dict['target_name']}.txt", diff_report,