gallery.py 文件源码

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

项目:gallery-cms 作者: crccheck 项目源码 文件源码
def get_safe_value(self, key):
        """
        Get the meta value or an empty string.

        http://python3-exiv2.readthedocs.io/en/latest/api.html
        http://python3-exiv2.readthedocs.io/en/latest/tutorial.html
        """
        try:
            val = self.meta[key].value
            if self.meta[key].repeatable:
                return val

            return val[0]

        except KeyError:
            return ''
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号