carnet.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:carnet 作者: bisho 项目源码 文件源码
def pair(config):
    """Pair to your account.

    This is still useless, but will be needed for
    certain remore commands on the vehicle.
    """
    api = api_from_config(config)

    if not api.request_pairing():
        raise click.ClickException("Unable to request pairing")
    click.echo(
        "A Pairing code has been requested to your phone."
        "Please enter it below!")

    code = click.prompt('Registration Code', type=int)

    if api.confirm_pairing(code):
        raise click.ClickException("Error pairing client")
    click.echo(click.style("Pairing sucessfull!", fg='green'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号