'Called when we\'ve received a line'

def lineReceived(self, line):

    if (line.strip() == ''):
        return
    line = line.decode('utf-8')
    (cmd_name, rest_of_line) = line.split('    ', 1)
    if (cmd_name not in self.VALID_INBOUND_COMMANDS):
        logger.error('[%s]    invalid    command    %s', self.id(), cmd_name)
        self.send_error('invalid    command:    %s', cmd_name)
        return
    self.last_received_command = self.clock.time_msec()
    self.inbound_commands_counter.inc(cmd_name)
    cmd_cls = COMMAND_MAP[cmd_name]
    try:
        cmd = cmd_cls.from_line(rest_of_line)
    except Exception as e:
        logger.exception('[%s]    failed    to    parse    line    %r:    %r', self.id(), cmd_name, rest_of_line)
        self.send_error(('failed    to    parse    line    for        %r:    %r    (%r):' % (cmd_name, e, rest_of_line)))
        return
    try:
        getattr(self, ('on_%s' % (cmd_name,)))(cmd)
    except Exception:
        logger.exception('[%s]    Failed    to    handle    line:    %r', self.id(), line)
