DebugClients/Python/AsyncFile.py

changeset 5287
971f24c89e6b
parent 5258
cfca063afa07
child 5389
9b1c800daff3
equal deleted inserted replaced
5286:d14191a9ca44 5287:971f24c89e6b
101 def flush(self): 101 def flush(self):
102 """ 102 """
103 Public method to write all pending entries. 103 Public method to write all pending entries.
104 """ 104 """
105 while self.wpending: 105 while self.wpending:
106 buf = self.wpending.pop(0) 106 try:
107 buf = self.wpending.pop(0)
108 except IndexError:
109 break
110
107 try: 111 try:
108 try: 112 try:
109 buf = buf.encode('utf-8', 'backslashreplace') 113 buf = buf.encode('utf-8', 'backslashreplace')
110 except (UnicodeEncodeError, UnicodeDecodeError): 114 except (UnicodeEncodeError, UnicodeDecodeError):
111 pass 115 pass

eric ide

mercurial