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
评论列表
文章目录