DebugClients/Python/AsyncFile.py

changeset 5287
971f24c89e6b
parent 5258
cfca063afa07
child 5389
9b1c800daff3
--- a/DebugClients/Python/AsyncFile.py	Wed Nov 02 19:39:52 2016 +0100
+++ b/DebugClients/Python/AsyncFile.py	Thu Nov 03 22:30:07 2016 +0100
@@ -103,7 +103,11 @@
         Public method to write all pending entries.
         """
         while self.wpending:
-            buf = self.wpending.pop(0)
+            try:
+                buf = self.wpending.pop(0)
+            except IndexError:
+                break
+            
             try:
                 try:
                     buf = buf.encode('utf-8', 'backslashreplace')

eric ide

mercurial