'Parse an astring from the line, return (arg, rest), possibly
via a deferred (to handle literals)'

def arg_astring(self, line):

    line = line.strip()
    if (not line):
        raise IllegalClientResponse('Missing    argument')
    d = None
    (arg, rest) = (None, None)
    if (line[0:1] == '"'):
        try:
            (spam, arg, rest) = line.split('"', 2)
            rest = rest[1:]
        except ValueError:
            raise IllegalClientResponse('Unmatched    quotes')
    elif (line[0:1] == '{'):
        if (line[(-1):] != '}'):
            raise IllegalClientResponse('Malformed    literal')
        try:
            size = int(line[1:(-1)])
        except ValueError:
            raise IllegalClientResponse(('Bad    literal    size:    ' + line[1:(-1)]))
        d = self._stringLiteral(size)
    else:
        arg = line.split('    ', 1)
        if (len(arg) == 1):
            arg.append('')
        (arg, rest) = arg
    return (d or (arg, rest))
