license.py 文件源码

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

项目:solaris-ips 作者: oracle 项目源码 文件源码
def get_local_path(self, img, pfmri):
                """Return an opener for the license text from the local disk or
                None if the data for the text is not on-disk."""

                if img.version <= 3:
                        # Older images stored licenses without accounting for
                        # '/', spaces, etc. properly.
                        path = os.path.join(img.get_license_dir(pfmri),
                            "license." + self.attrs["license"])
                else:
                        # Newer images ensure licenses are stored with encoded
                        # name so that '/', spaces, etc. are properly handled.
                        path = os.path.join(img.get_license_dir(pfmri),
                            "license." + quote(self.attrs["license"],
                            ""))
                return path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号