'Adds an agent from a description string of the form
[tor:][hostname:]path.'

def add_agent_from_string(self, masterid, string, source=None, maxwaiting=60):

    string = string.split(':', 1)
    if (string[0].lower() == 'tor'):
        string = string[1].split(':', 1)
        rsync = ['torify', 'rsync']
    else:
        rsync = None
    if (len(string) == 1):
        return self.add_agent(masterid, None, string[0], rsync=rsync, source=source, maxwaiting=maxwaiting)
    return self.add_agent(masterid, string[0], string[1], rsync=rsync, source=source, maxwaiting=maxwaiting)
