diff --git a/tools/pydfu.py b/tools/pydfu.py
index c6b6802c836fb01492d18fa9673986b9acb39e9a..e7f4ab17806d579fa9e828ce9d6d11368e7e66c3 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("")