summaryrefslogtreecommitdiff
path: root/tools/pydfu.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pydfu.py')
-rwxr-xr-xtools/pydfu.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/pydfu.py b/tools/pydfu.py
index c6b6802c8..e7f4ab178 100755
--- a/tools/pydfu.py
+++ b/tools/pydfu.py
@@ -482,7 +482,10 @@ def cli_progress(addr, offset, size):
print("\r0x{:08x} {:7d} [{}{}] {:3d}% "
.format(addr, size, '=' * done, ' ' * (width - done),
offset * 100 // size), end="")
- sys.stdout.flush()
+ try:
+ sys.stdout.flush()
+ except OSError:
+ pass # Ignore Windows CLI "WinError 87" on Python 3.6
if offset == size:
print("")