本文整理汇总了Python中lxml.objectify.Element.reject_empty_nonce_ts方法的典型用法代码示例。如果您正苦于以下问题:Python Element.reject_empty_nonce_ts方法的具体用法?Python Element.reject_empty_nonce_ts怎么用?Python Element.reject_empty_nonce_ts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lxml.objectify.Element
的用法示例。
在下文中一共展示了Element.reject_empty_nonce_ts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handle
# 需要导入模块: from lxml.objectify import Element [as 别名]
# 或者: from lxml.objectify.Element import reject_empty_nonce_ts [as 别名]
def handle(self, *args, **kwargs):
with closing(self.server.odb.session()) as session:
params = _get_params(kwargs.get('payload'), ['cluster_id'], 'data.')
definition_list = Element('definition_list')
definitions = wss_list(session, params['cluster_id'])
for definition in definitions:
definition_elem = Element('definition')
definition_elem.id = definition.id
definition_elem.name = definition.name
definition_elem.is_active = definition.is_active
definition_elem.password_type = definition.password_type
definition_elem.username = definition.username
definition_elem.reject_empty_nonce_ts = definition.reject_empty_nonce_ts
definition_elem.reject_stale_username = definition.reject_stale_username
definition_elem.expiry_limit = definition.expiry_limit
definition_elem.nonce_freshness = definition.nonce_freshness
definition_list.append(definition_elem)
return ZATO_OK, etree.tostring(definition_list)