'Internal: return one line from the server, stripping CRLF.
Raise EOFError if the connection is closed.'

def getline(self):

    line = self.file.readline()
    if (self.debugging > 1):
        print '*get*', repr(line)
    if (not line):
        raise EOFError
    if (line[(-2):] == CRLF):
        line = line[:(-2)]
    elif (line[(-1):] in CRLF):
        line = line[:(-1)]
    return line
