7835:0835ed67714b | 7836:2f0d208b8137 |
---|---|
111 """ | 111 """ |
112 data = b'' | 112 data = b'' |
113 self.connection.setblocking(False) | 113 self.connection.setblocking(False) |
114 try: | 114 try: |
115 data = self.connection.recv(length, socket.MSG_PEEK) | 115 data = self.connection.recv(length, socket.MSG_PEEK) |
116 except socket.error: | 116 except OSError: |
117 pass | 117 pass |
118 finally: | 118 finally: |
119 self.connection.setblocking(True) | 119 self.connection.setblocking(True) |
120 | 120 |
121 return data | 121 return data |
183 | 183 |
184 if isinstance(ret, Exception): | 184 if isinstance(ret, Exception): |
185 ret = str(ret) | 185 ret = str(ret) |
186 | 186 |
187 self.__send(fx, fn, ret) | 187 self.__send(fx, fn, ret) |
188 except socket.error: | 188 except OSError: |
189 pass | 189 pass |
190 except Exception: | 190 except Exception: |
191 exctype, excval, exctb = sys.exc_info() | 191 exctype, excval, exctb = sys.exc_info() |
192 tbinfofile = io.StringIO() | 192 tbinfofile = io.StringIO() |
193 traceback.print_tb(exctb, None, tbinfofile) | 193 traceback.print_tb(exctb, None, tbinfofile) |