aptly.py 文件源码

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

项目:gopythongo 作者: gopythongo 项目源码 文件源码
def validate_args(self, args: configargparse.Namespace) -> None:
        _aptly_args.validate_shared_args(args)

        from gopythongo.versioners import get_version_parsers
        debvp = cast(DebianVersionParser, get_version_parsers()["debian"])  # type: DebianVersionParser
        if args.version_action not in debvp.supported_actions:
            raise ErrorMessage("Version Action is set to '%s', but you chose the Aptly Store which relies on Debian "
                               "version strings. Unfortunately the Debian Versioner does not support the '%s' action. "
                               "It only supports: %s." %
                               (highlight(args.version_action), highlight(args.version_action),
                                highlight(", ".join(debvp.supported_actions))))

        if "-distribution" in args.aptly_publish_opts:
            print_warning("You are using %s in your Aptly Store options. You should use the %s GoPythonGo argument "
                          "instead, since using -distribution in the aptly command line is invalid when GoPythonGo "
                          "tries to update a published repo." %
                          (highlight("-distribution"), highlight("--aptly-distribution")))

        if args.use_aptly_wrapper:
            wrapper_cmd = create_script_path(the_context.gopythongo_path, "vaultwrapper")
            if not os.path.exists(wrapper_cmd) or not os.access(wrapper_cmd, os.X_OK):
                raise ErrorMessage("%s can either not be found or is not executable. The vault wrapper seems to "
                                   "be unavailable." % wrapper_cmd)
            self.aptly_wrapper_cmd = wrapper_cmd
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号