zenpacklib.py 文件源码

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

项目:docker-zenoss4 作者: krull 项目源码 文件源码
def apply_zen21467_patch(self):
        """Patch cause of ZEN-21467 issue.

        The problem is that zenpacklib sets string property values to unicode
        strings instead of regular strings. There's a platform bug that
        prevents unicode values from being serialized to be used by zenjmx.
        This means that JMX datasources won't work without this patch.

        """
        try:
            from Products.ZenHub.XmlRpcService import XmlRpcService
            if types.UnicodeType not in XmlRpcService.PRIMITIVES:
                XmlRpcService.PRIMITIVES.append(types.UnicodeType)
        except Exception:
            # The above may become wrong in future platform versions.
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号