- msg = 'OK %d\n%s' % (len(str(result)), result)
- self.file.sendto(msg, addr)
- #try:
- # d.dispatch(msg)
- #except dis.BadRouteError, inst:
- # sock.sendto('Bad route from : ' + inst.cmd + '\n', addr)
- #except dis.CommandNotFoundError, inst:
- # sock.sendto('Command not found : ' + inst.cmd + '\n', addr)
+ response += u'%d\n%s' % (len(result), result)
+ self.file.sendto(response, addr)