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