From: Angus Gratton Date: Fri, 15 Dec 2017 05:45:44 +0000 (+1100) Subject: idf_monitor: Fix Windows 10 bug in cases where second console write also fails X-Git-Tag: v3.0~101^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e0f905761f6185ef27c46f8b374f68265a2db68;p=esp-idf idf_monitor: Fix Windows 10 bug in cases where second console write also fails Although in my tests the second write always passes, people have reported different results. Closes https://github.com/espressif/esp-idf/issues/1136 (again) --- diff --git a/tools/idf_monitor.py b/tools/idf_monitor.py index 49e2b74b82..6bc63f7e3e 100755 --- a/tools/idf_monitor.py +++ b/tools/idf_monitor.py @@ -563,8 +563,11 @@ if os.name == 'nt': self.output.write(b) except IOError: # Windows 10 bug since the Fall Creators Update, sometimes writing to console randomly fails - # (but always succeeds the second time, it seems.) Ref https://github.com/espressif/esp-idf/issues/1136 - self.output.write(b) + # (but usually succeeds the second time, it seems.) Ref https://github.com/espressif/esp-idf/issues/1136 + try: + self.output.write(b) + except IOError: + pass self.matched = b'' def flush(self):