__main__.py 文件源码

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

项目:passpy 作者: bfrascher 项目源码 文件源码
def rm(ctx, pass_name, recursive, force):
    """Remove the password names `pass-name` from the password store.
    This command is alternatively named `remove` or `delete`.  If
    `--recursive` or `-r` is specified, delete pass-name recursively
    if it is a directory.  If `--force` or `-f` is specified, do not
    interactively prompt before removal.

    """
    try:
        ctx.obj.remove_path(pass_name, recursive, force)
    except StoreNotInitialisedError:
        click.echo(MSG_STORE_NOT_INITIALISED_ERROR)
        return 1
    except FileNotFoundError:
        click.echo('{0} is not in the password store.'.format(pass_name))
        return 1
    except PermissionError:
        click.echo(MSG_PERMISSION_ERROR)
        return 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号