'Login at the peer repository
@return: None if successful, otherwise the error'

def login(self):

    repository = self.repository
    url = repository.url
    error = None
    if (not url):
        error = 'Remote    URL    required    for    FTP    Push'
    else:
        import ftplib
        try:
            ftp_connection = ftplib.FTP(url)
        except ftplib.all_errors:
            error = sys.exc_info()[1]
        else:
            try:
                ftp_connection.login(repository.username, repository.password)
            except ftplib.error_perm:
                error = sys.exc_info()[1]
        self.ftp_connection = ftp_connection
    if error:
        current.log.debug(error)
    return error
