(self, c)
| 197 | t.start() |
| 198 | |
| 199 | def _handle_request(self, c): |
| 200 | request = None |
| 201 | try: |
| 202 | connection.deliver_challenge(c, self.authkey) |
| 203 | connection.answer_challenge(c, self.authkey) |
| 204 | request = c.recv() |
| 205 | ignore, funcname, args, kwds = request |
| 206 | assert funcname in self.public, '%r unrecognized' % funcname |
| 207 | func = getattr(self, funcname) |
| 208 | except Exception: |
| 209 | msg = ('#TRACEBACK', format_exc()) |
| 210 | else: |
| 211 | try: |
| 212 | result = func(c, *args, **kwds) |
| 213 | except Exception: |
| 214 | msg = ('#TRACEBACK', format_exc()) |
| 215 | else: |
| 216 | msg = ('#RETURN', result) |
| 217 | |
| 218 | try: |
| 219 | c.send(msg) |
| 220 | except Exception as e: |
| 221 | try: |
| 222 | c.send(('#TRACEBACK', format_exc())) |
| 223 | except Exception: |
| 224 | pass |
| 225 | util.info('Failure to send message: %r', msg) |
| 226 | util.info(' ... request was %r', request) |
| 227 | util.info(' ... exception was %r', e) |
| 228 | |
| 229 | def handle_request(self, conn): |
| 230 | ''' |
no test coverage detected