'Send registration request to the peer'

@staticmethod
def sync_repository_onaccept(form):

    try:
        repository_id = form.vars.id
    except:
        return
    sync = current.sync
    if repository_id:
        rtable = current.s3db.sync_repository
        query = (rtable.id == repository_id)
        repository = current.db(query).select(limitby=(0, 1)).first()
        if (repository and repository.url):
            from s3.s3sync import S3SyncRepository
            connector = S3SyncRepository(repository)
            success = connector.register()
            if (not success):
                current.response.warning = current.T('Could    not    auto-register    at    the    repository,    please    register    manually.')
            else:
                current.response.confirmation = current.T('Successfully    registered    at    the    repository.')
    return
