plugin_formatter.py: Improve the output when processing docs (#46541)

* Improve the output when processing files

* Update docs/bin/plugin_formatter.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Show progress indicator.

* Don't pp.pformat() huge structures when they aren't used anyway.

This saves ~10 seconds on my machine.

* Only show ASCII spinner if stdout is a TTY.

* Fix: E722 do not use bare 'except'
This commit is contained in:
Dag Wieers 2018-12-18 18:23:49 +01:00 committed by Alicia Cozine
parent 40144c7486
commit ee29ba5d4f
2 changed files with 35 additions and 6 deletions

View file

@ -36,3 +36,6 @@ def update_file_if_different(filename, b_data):
if b_data_old != b_data:
with open(filename, 'wb') as f:
f.write(b_data)
return True
return False