def resync_package(ctx, opts, owner, repo, slug, skip_errors):
    """Resynchronise a package."""
    click.echo(
        "Resynchonising the %(slug)s package ... "
        % {"slug": click.style(slug, bold=True)},
        nl=False,
    )

    context_msg = "Failed to resynchronise package!"
    with handle_api_exceptions(
        ctx, opts=opts, context_msg=context_msg, reraise_on_error=skip_errors
    ):
        with maybe_spinner(opts):
            api_resync_package(owner=owner, repo=repo, identifier=slug)

    click.secho("OK", fg="green")
def resync_package ( ctx , opts , owner , repo , slug , skip_errors ) : click . echo ( "Resynchonising the %(slug)s package ... " % { "slug" : click . style ( slug , bold = True ) } , nl = False , ) context_msg = "Failed to resynchronise package!" with handle_api_exceptions ( ctx , opts = opts , context_msg = context_msg , reraise_on_error = skip_errors ) : with maybe_spinner ( opts ) : api_resync_package ( owner = owner , repo = repo , identifier = slug ) click . secho ( "OK" , fg = "green" )
Resynchronise a package.